/* VocabBuilder CSS Stylesheet */

:root {
    --primary-color: #2C3E50;
    --secondary-color: #16A085;
    --accent-color: #E67E22;
    --background-color: #F8F9FA;
    --text-color: #2C3E50;
    --border-color: #DEE2E6;
    --card-shadow: 0 2px 4px rgba(0,0,0,0.1);
    --hover-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.navbar {
    background: white;
    box-shadow: var(--card-shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-brand h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.nav-brand a {
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-link:hover {
    background-color: var(--background-color);
    color: var(--secondary-color);
}

.nav-link.active {
    background-color: var(--secondary-color);
    color: white;
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    min-width: 200px;
}

.search-btn {
    padding: 0.5rem 1rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: auto;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: #128F76;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--accent-color);
    color: white;
}

.btn-secondary:hover {
    background: #D35400;
}

.btn-outline {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Cards */
.card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.word-of-day {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.word-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Word List */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.filters-bar {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
}

.filter-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.filter-select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
}

.words-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.word-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s;
}

.word-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--hover-shadow);
}

.word-card-title {
    margin-bottom: 1rem;
}

.word-card-title a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.3rem;
}

.word-card-title a:hover {
    color: var(--secondary-color);
}

.word-card-meaning {
    color: #6C757D;
    margin-bottom: 1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
}

.pagination-btn,
.pagination-number {
    padding: 0.5rem 1rem;
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination-btn:hover,
.pagination-number:hover {
    background: var(--secondary-color);
    color: white;
}

.pagination-current {
    padding: 0.5rem 1rem;
    background: var(--secondary-color);
    color: white;
    border-radius: 4px;
}

/* Word Detail */
.word-detail {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.word-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.nav-arrow {
    color: var(--secondary-color);
    text-decoration: none;
}

.nav-arrow.disabled {
    color: #CCC;
    cursor: not-allowed;
}

.word-main {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.word-section {
    margin-bottom: 2rem;
}

.word-section h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.definition-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--background-color);
    border-radius: 4px;
}

.part-of-speech {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--secondary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.example-item {
    margin-bottom: 1rem;
}

.example-quote {
    padding: 1rem;
    border-left: 4px solid var(--accent-color);
    background: var(--background-color);
    font-style: italic;
}

.word-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

/* Search Page */
.search-container {
    max-width: 800px;
    margin: 0 auto 2rem;
}

.search-input-large {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.search-result-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

/* Study Mode */
.study-mode {
    max-width: 800px;
    margin: 0 auto;
}

.flashcard-container {
    min-height: 400px;
    margin-bottom: 2rem;
}

.flashcard {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--hover-shadow);
    text-align: center;
    transition: transform 0.6s;
}

.flashcard-word {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.flashcard-content {
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.flashcard-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.part-of-speech-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--secondary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.study-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.study-progress {
    margin-bottom: 2rem;
}

.progress-bar {
    height: 20px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transition: width 0.3s;
}

.progress-text {
    text-align: center;
    color: #6C757D;
}

.study-tips {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: 8px;
}

/* About Page */
.about-section {
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
}

.stat-label {
    margin-top: 0.5rem;
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 4rem 0;
}

.error-code {
    font-size: 6rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6C757D;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .word-main {
        font-size: 2rem;
    }
    
    .features-grid,
    .words-grid {
        grid-template-columns: 1fr;
    }
    
    .study-controls {
        flex-wrap: wrap;
    }
    
    .word-navigation {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
