/* Vocabulary Game Styles */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    min-height: 100vh;
    padding-bottom: 60px;
    transition: background 0.3s ease;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h1 {
    font-size: 1.5rem;
    color: #0ea5e9;
    font-weight: 700;
}

.nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 15px;
}

.vocab-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

/* Vocab Card */
.vocab-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease;
}

.game-header {
    text-align: center;
    margin-bottom: 1.2rem;
}

.game-header h2 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.game-instructions {
    color: #666;
    font-size: 0.9rem;
}

/* Word Display */
.word-display {
    text-align: center;
    margin: 1.2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.word-main {
    font-size: 2.2rem;
    font-weight: 700;
    color: #0ea5e9;
    text-transform: lowercase;
    letter-spacing: 1px;
}

.pronounce-btn {
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.4rem;
    border: none;
    background: transparent;
    transition: transform 0.2s ease;
}

.pronounce-btn:hover {
    transform: scale(1.2);
}

/* Definition and Example Sections */
.definition-section,
.example-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
}

.section-header .icon {
    font-size: 1.3rem;
}

.section-header h3 {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.definition-text,
.example-text {
    color: #555;
    font-size: 1rem;
    line-height: 1.5;
}

.example-text {
    font-style: italic;
    color: #666;
}

/* Difficulty Section */
.difficulty-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.difficulty-label {
    color: #666;
    font-weight: 600;
}

.difficulty-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: capitalize;
}

.difficulty-easy {
    background: #d4edda;
    color: #155724;
}

.difficulty-medium {
    background: #fff3cd;
    color: #856404;
}

.difficulty-hard {
    background: #f8d7da;
    color: #721c24;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    flex: 1;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary.learned {
    background: #28a745;
}

.btn-secondary {
    background: white;
    color: #0ea5e9;
    border: 2px solid #0ea5e9;
    flex: 1;
}

.btn-secondary:hover {
    background: #f0f4ff;
    transform: translateY(-2px);
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s ease;
}

.btn-icon:hover {
    transform: scale(1.1);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Status Message */
.status-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    animation: slideIn 0.3s ease;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
}

.status-message.info {
    background: #d1ecf1;
    color: #0c5460;
}

.status-message.hidden {
    display: none;
}

/* Stats Card */
.stats-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.stats-card h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0ea5e9;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

.modal-large {
    max-width: 800px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover {
    color: #000;
}

/* History List */
.history-list {
    margin-top: 1.5rem;
}

.history-item {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid #0ea5e9;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.history-word {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0ea5e9;
    text-transform: lowercase;
}

.history-definition {
    color: #555;
    margin: 0.5rem 0;
    font-size: 1rem;
}

.history-example {
    color: #666;
    font-style: italic;
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.history-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    color: #999;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.empty-history {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-history-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-history p {
    color: #666;
    font-size: 1.1rem;
}

/* Settings */
.settings-section {
    margin: 1.5rem 0;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid #eee;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info {
    flex: 1;
}

.setting-info label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
    cursor: pointer;
}

.setting-description {
    color: #666;
    font-size: 0.9rem;
}

/* Toggle Switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle input:checked + .toggle-slider {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
}

.toggle input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.settings-actions {
    margin-top: 2rem;
    text-align: center;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem 0;
    margin-top: 3rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #06b6d4;
    text-decoration: underline;
}

.footer-links .separator {
    color: #ccc;
}

.footer-social {
    margin: 15px 0;
}

.social-btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
    display: inline-block;
    text-decoration: none;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.6);
}

.footer-copyright {
    color: #666;
    font-size: 0.9rem;
    margin-top: 15px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Dark Mode */
body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.dark-mode .navbar,
body.dark-mode .vocab-card,
body.dark-mode .stats-card,
body.dark-mode .modal-content {
    background: #2d2d44;
    color: #e0e0e0;
}

body.dark-mode .game-header h2,
body.dark-mode .section-header h3,
body.dark-mode .stats-card h3,
body.dark-mode .history-word {
    color: #8b9aff;
}

body.dark-mode .game-instructions,
body.dark-mode .definition-text,
body.dark-mode .example-text,
body.dark-mode .stat-label {
    color: #b0b0b0;
}

body.dark-mode .definition-section,
body.dark-mode .example-section,
body.dark-mode .history-item {
    background: #1e1e30;
}

body.dark-mode .btn-secondary {
    background: #1e1e30;
    color: #8b9aff;
    border-color: #8b9aff;
}

body.dark-mode .btn-secondary:hover {
    background: #2d2d44;
}

body.dark-mode .footer {
    background: rgba(26, 26, 46, 0.95);
}

body.dark-mode .footer-links a {
    color: #8a9aef;
}

body.dark-mode .footer-links a:hover {
    color: #a8b4f5;
}

body.dark-mode .footer-links .separator {
    color: #555;
}

body.dark-mode .footer-copyright {
    color: #b0b0b0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }

    .navbar h1 {
        font-size: 1.2rem;
    }

    .vocab-card {
        padding: 1.5rem;
    }

    .word-main {
        font-size: 2rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }

    .history-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .history-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .footer-links .separator {
        display: none;
    }
}

@media (min-width: 769px) {
    .vocab-container {
        grid-template-columns: 2fr 1fr;
    }
}
