﻿:root {
    --bg-primary: #F0EBE0;
    --bg-secondary: #E8DFD0;
    --bg-dark: #1D1D1D;
    --text-primary: #2A1F14;
    --text-secondary: #6B5B4E;
    --text-light: #FFFFFF;
    --accent-blue: #3AB3DA;
    --accent-green: #5D9E31;
    --accent-purple: #8B4699;
    --card-shadow: rgba(0,0,0,0.3);
    --border-color: #9E8A70;
    --mc-dirt: #866044;
    --mc-grass: #5D9E31;
    --mc-stone: #8A8A8A;
    --mc-wood: #B8935A;
    --mc-gold: #FCBA04;
    --mc-diamond: #3AB3DA;
    --mc-obsidian: #1A0E2A;
}

[data-theme="dark"] {
    --bg-primary: #1D1D1D;
    --bg-secondary: #2D2416;
    --bg-dark: #0A0A0A;
    --text-primary: #E0D8C8;
    --text-secondary: #A89880;
    --text-light: #FFFFFF;
    --accent-blue: #5DCFE8;
    --accent-green: #7AD95C;
    --accent-purple: #BB75D8;
    --card-shadow: rgba(0,0,0,0.6);
    --border-color: #5C4A30;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    image-rendering: auto;
}

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

/* Navigation */
.navbar {
    background: #1D1D1D;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 31px,
        rgba(255,255,255,0.03) 31px,
        rgba(255,255,255,0.03) 32px
    ), repeating-linear-gradient(
        90deg,
        transparent,
        transparent 31px,
        rgba(255,255,255,0.03) 31px,
        rgba(255,255,255,0.03) 32px
    );
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 4px solid var(--mc-grass);
    box-shadow: 0 4px 0 #3D6B21, 0 8px 16px rgba(0,0,0,0.6);
}

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

.logo {
    font-family: 'Press Start 2P', 'Courier New', monospace;
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--mc-grass);
    text-shadow: 2px 2px #000, -1px -1px #000, 1px -1px #000, -1px 1px #000;
    letter-spacing: -0.5px;
    text-decoration: none;
    white-space: nowrap;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 6px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.1rem;
    align-items: center;
}

.nav-links a {
    color: #CCCCCC;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--mc-grass);
    text-shadow: 0 0 8px rgba(93, 158, 49, 0.5);
}

/* Mod Editor Nav Link */
.nav-links a.mod-editor-link {
    background: linear-gradient(135deg, #2e2e2e, #1a1a1a);
    color: #666;
    padding: 5px 10px;
    border-radius: 6px;
    border: 2px solid #3a3a3a;
    box-shadow: 0 2px 0 rgba(0,0,0,0.5);
    transition: all 0.2s;
    text-shadow: none;
    cursor: not-allowed;
    opacity: 0.65;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
}

.nav-links a.mod-editor-link:hover,
.nav-links a.mod-editor-link.active {
    background: linear-gradient(135deg, #2e2e2e, #1a1a1a);
    color: #666;
    transform: none;
    box-shadow: 0 2px 0 rgba(0,0,0,0.5);
    text-shadow: none;
}

.mod-soon-badge {
    font-size: 0.65em;
    background: #3a3a3a;
    color: #777;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 1px 5px;
    font-family: sans-serif;
    white-space: nowrap;
    letter-spacing: 0.02em;
    text-transform: none;
}

/* Mods Forge Nav Link */
.nav-links a.mods-nav-link {
    background: linear-gradient(135deg, #3a7a10, #275208);
    color: #fff;
    padding: 5px 11px;
    border-radius: 6px;
    border: 2px solid #5D9E31;
    box-shadow: 0 2px 0 rgba(0,0,0,0.4);
    transition: all 0.2s;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    font-size: 0.72rem;
}

.nav-links a.mods-nav-link:hover,
.nav-links a.mods-nav-link.active {
    background: linear-gradient(135deg, #5D9E31, #3a7a10);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 0 rgba(0,0,0,0.4);
}

/* Language Selector */
.settings-btn {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

/* Navbar Right Container */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}


/* Auth Button */
.auth-btn {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

.auth-avatar {
    width: 28px;
    height: 28px;
    border-radius: 2px;
    background: var(--mc-grass);
    color: white;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    text-transform: uppercase;
    box-shadow: 0 2px 0 rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

/* Profile Menu */
.profile-menu {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--bg-secondary);
    border-radius: 15px;
    box-shadow: 0 10px 40px var(--card-shadow);
    width: 280px;
    z-index: 1001;
    animation: slideInRight 0.3s ease;
    padding: 0;
}

.profile-header {
    background: #1D1D1D;
    border-bottom: 3px solid var(--mc-grass);
    color: white;
    padding: 1.2rem 1.5rem;
    border-radius: 15px 15px 0 0;
}

.profile-header p {
    margin: 0;
    font-weight: 600;
}

.profile-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0 0 15px 15px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
}

.profile-btn:hover {
    background: #e8e0f1;
}

/* Settings Menu */
.settings-menu {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--bg-secondary);
    border-radius: 15px;
    box-shadow: 0 10px 40px var(--card-shadow);
    width: 320px;
    z-index: 1001;
    display: none;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.settings-menu.show {
    display: block;
}

.settings-header {
    background: #1D1D1D;
    border-bottom: 3px solid var(--mc-grass);
    color: white;
    padding: 1.2rem 1.5rem;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-header h3 {
    margin: 0;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    line-height: 1.5;
}

.close-settings {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.close-settings:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.settings-body {
    padding: 1.5rem;
}

.setting-section {
    margin-bottom: 1.5rem;
}

.setting-section:last-child {
    margin-bottom: 0;
}

.setting-section h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.setting-options {
    display: flex;
    gap: 0.8rem;
}

.setting-option {
    flex: 1;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-primary);
    font-weight: 500;
}

.setting-option:hover {
    transform: translateY(-3px);
    border-color: var(--mc-grass);
    box-shadow: 0 5px 15px var(--card-shadow);
}

.setting-option.active {
    background: var(--mc-grass);
    border-color: #3D6B21;
    color: white;
    box-shadow: inset -2px -3px 0 rgba(0,0,0,0.3);
}

.option-icon {
    font-size: 1.8rem;
}

/* Overlay pour fermer le menu */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 999;
    display: none;
}

.settings-overlay.show {
    display: block;
}

.language-selector {
    display: flex;
    gap: 0.5rem;
}

/* Theme Toggle */
.theme-toggle {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    margin-right: 1rem;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(20deg);
}

.lang-btn {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    transition: all 0.3s;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

.lang-btn.active {
    background: var(--mc-grass);
    border-color: #3D6B21;
}

/* Hero Section */
.hero {
    background: linear-gradient(
        180deg,
        #87CEEB 0%,
        #90D8F5 45%,
        #6AB8E8 55%,
        #5D9E31 55%,
        #4A8A21 62%,
        #866044 62%,
        #7A5538 68%,
        #5C3E28 68%
    );
    color: white;
    padding: 100px 20px 140px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content h1 {
    font-family: 'Press Start 2P', 'Courier New', monospace;
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: #FFFFFF;
    text-shadow: 3px 3px #000, -1px -1px #000, 1px -1px #000, -1px 1px #000,
                 4px 4px rgba(0,0,0,0.5);
    line-height: 1.4;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    font-size: 0.85rem;
    font-family: 'Press Start 2P', monospace;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    image-rendering: pixelated;
    position: relative;
}

.btn-primary {
    background-color: #5D9E31;
    color: white;
    text-shadow: 1px 1px #000;
    box-shadow: inset -3px -4px 0 rgba(0,0,0,0.35), inset 3px 3px 0 rgba(255,255,255,0.15);
    border-radius: 2px;
}

.btn-primary::before {
    display: none;
}

.btn-primary:hover::before {
    display: none;
}

.btn-primary:hover {
    background-color: #6DBB3A;
    transform: translateY(-1px);
    box-shadow: inset -3px -4px 0 rgba(0,0,0,0.35), inset 3px 3px 0 rgba(255,255,255,0.2), 0 4px 12px rgba(93,158,49,0.4);
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: inset -1px -2px 0 rgba(0,0,0,0.35), inset 1px 1px 0 rgba(255,255,255,0.15);
}

.btn-secondary {
    background-color: #3AB3DA;
    color: white;
    text-shadow: 1px 1px #000;
    box-shadow: inset -3px -4px 0 rgba(0,0,0,0.35), inset 3px 3px 0 rgba(255,255,255,0.15);
    border-radius: 2px;
}

.btn-secondary::before {
    display: none;
}

.btn-secondary:hover::before {
    display: none;
}

.btn-secondary:hover {
    background-color: #56C5E8;
    transform: translateY(-1px);
    box-shadow: inset -3px -4px 0 rgba(0,0,0,0.35), inset 3px 3px 0 rgba(255,255,255,0.2), 0 4px 12px rgba(58,179,218,0.4);
}

.btn-secondary:active {
    transform: translateY(2px);
    box-shadow: inset -1px -2px 0 rgba(0,0,0,0.35), inset 1px 1px 0 rgba(255,255,255,0.15);
}

/* Features Section */
.features {
    padding: 80px 20px;
    background-color: var(--bg-secondary);
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 47px,
        rgba(0,0,0,0.04) 47px,
        rgba(0,0,0,0.04) 48px
    );
}

.features h2 {
    text-align: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.6rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
    text-shadow: 2px 2px rgba(0,0,0,0.15);
    line-height: 1.5;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 2px;
    box-shadow: 0 4px 0 rgba(0,0,0,0.3), 0 6px 16px var(--card-shadow),
                inset 0 1px 0 rgba(255,255,255,0.2);
    border: 2px solid var(--border-color);
    border-top-color: rgba(255,255,255,0.4);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: fadeInUp 0.6s ease;
    position: relative;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 0 rgba(0,0,0,0.3), 0 12px 24px var(--card-shadow),
                inset 0 1px 0 rgba(255,255,255,0.2);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.card h3 {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.card p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

/* Tips Section */
.tips {
    padding: 80px 20px;
    background: linear-gradient(135deg, #3B1B1B 0%, #6B2423 50%, #8B3A28 100%);
    position: relative;
}

.tips::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255,100,0,0.03) 0px,
        rgba(255,100,0,0.03) 4px,
        transparent 4px,
        transparent 20px
    );
    pointer-events: none;
}

.tips h2 {
    text-align: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.6rem;
    margin-bottom: 3rem;
    color: #FFB84D;
    text-shadow: 2px 2px #000;
    line-height: 1.5;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.tip {
    background: rgba(0,0,0,0.35);
    padding: 1.5rem;
    border-radius: 2px;
    border: 2px solid rgba(255, 120, 0, 0.3);
    border-top: 2px solid rgba(255,180,0,0.4);
    box-shadow: 0 4px 0 rgba(0,0,0,0.4), 0 6px 16px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
    animation: fadeIn 0.8s ease;
}

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

.tip:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 0 rgba(0,0,0,0.4), 0 10px 20px rgba(0,0,0,0.3);
    border-color: rgba(255,160,0,0.5);
}

.tip h4 {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    margin-bottom: 0.8rem;
    color: #FFB84D;
    text-shadow: 1px 1px #000;
    line-height: 1.5;
}

.tip p {
    color: #E0C8A0;
}

/* Recipes Section */
.recipes {
    padding: 80px 20px;
    background-color: var(--bg-secondary);
    background-image: repeating-linear-gradient(
        0deg,
        rgba(0,0,0,0.04) 0px,
        rgba(0,0,0,0.04) 2px,
        transparent 2px,
        transparent 48px
    ), repeating-linear-gradient(
        90deg,
        rgba(0,0,0,0.04) 0px,
        rgba(0,0,0,0.04) 2px,
        transparent 2px,
        transparent 48px
    );
}

.recipes h2 {
    text-align: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.6rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
    text-shadow: 2px 2px rgba(0,0,0,0.1);
    line-height: 1.5;
}

.recipe-list {
    max-width: 900px;
    margin: 0 auto;
}

.recipe-search {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.recipe-search input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    transition: border-color 0.3s;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.recipe-search input:focus {
    outline: none;
    border-color: var(--mc-grass);
}

.recipe-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: var(--bg-primary);
    border-radius: 2px;
    border-left: 4px solid var(--mc-grass);
    box-shadow: 0 3px 0 rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    cursor: pointer;
}

.recipe-item:hover {
    transform: translateX(6px);
    box-shadow: 0 3px 0 rgba(0,0,0,0.2), 0 4px 12px var(--card-shadow);
    border-left-width: 6px;
}

.recipe-name {
    font-weight: bold;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.recipe-materials {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Command Finder Section */
.command-finder {
    padding: 80px 20px;
    background: linear-gradient(180deg, #5C5C5C 0%, #7F7F7F 40%, #8A8A8A 100%);
    background-image: linear-gradient(180deg, #5C5C5C 0%, #7F7F7F 40%, #8A8A8A 100%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 15px,
            rgba(0,0,0,0.06) 15px,
            rgba(0,0,0,0.06) 16px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 15px,
            rgba(0,0,0,0.06) 15px,
            rgba(0,0,0,0.06) 16px
        );
    position: relative;
}

.command-finder h2 {
    text-align: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 2px 2px #000;
    line-height: 1.5;
}

.subtitle {
    text-align: center;
    color: white;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* Fix subtitle visibility in recipes section */
.recipes .subtitle {
    color: var(--text-primary);
}

.search-box {
    max-width: 800px;
    margin: 0 auto 3rem;
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--card-shadow);
}

.search-box textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 1rem;
    transition: border-color 0.3s;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.search-box textarea:focus {
    outline: none;
    border-color: var(--mc-grass);
}

.btn-search {
    width: 100%;
    padding: 15px;
    background: #5D9E31;
    color: white;
    border: none;
    border-radius: 2px;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    font-weight: 400;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    text-shadow: 1px 1px #000;
    box-shadow: inset -3px -4px 0 rgba(0,0,0,0.35), inset 3px 3px 0 rgba(255,255,255,0.15);
}

.btn-search:hover {
    background: #6DBB3A;
    transform: translateY(-1px);
    box-shadow: inset -3px -4px 0 rgba(0,0,0,0.35), inset 3px 3px 0 rgba(255,255,255,0.2), 0 4px 12px rgba(93,158,49,0.5);
}

.command-result {
    max-width: 800px;
    margin: 0 auto 3rem;
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 2px;
    box-shadow: 0 6px 0 rgba(0,0,0,0.3), 0 8px 20px var(--card-shadow);
    border: 2px solid var(--border-color);
    animation: slideIn 0.5s ease;
}

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

.result-header h3 {
    color: var(--mc-grass);
    margin-bottom: 1.5rem;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    text-shadow: 1px 1px rgba(0,0,0,0.1);
}

.command-box {
    position: relative;
    background: #1D1D1D;
    padding: 1.5rem;
    border-radius: 2px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 2px solid #3A3A3A;
    border-top-color: #555;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.5);
}

.command-box code {
    color: #5D9E31;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    flex-grow: 1;
    text-shadow: 0 0 8px rgba(93, 158, 49, 0.5);
}

.btn-copy {
    padding: 8px 15px;
    background-color: #3AB3DA;
    color: white;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-size: 0.75rem;
    font-family: 'Press Start 2P', monospace;
    white-space: nowrap;
    transition: background-color 0.2s;
    box-shadow: inset -2px -3px 0 rgba(0,0,0,0.35);
    text-shadow: 1px 1px #000;
}

.btn-copy:hover {
    background-color: #56C5E8;
}

.command-explanation {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 8px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.popular-commands {
    max-width: 1000px;
    margin: 0 auto;
}

.popular-commands h3 {
    text-align: center;
    color: white;
    font-family: 'Press Start 2P', monospace;
    font-size: 1rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px #000;
    line-height: 1.5;
}

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

.example-command {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 2px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border: 2px solid var(--border-color);
    border-top-color: rgba(255,255,255,0.4);
    box-shadow: 0 4px 0 rgba(0,0,0,0.25);
}

.example-command:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 0 rgba(0,0,0,0.25), 0 10px 16px rgba(0,0,0,0.15);
}

.example-text {
    font-weight: bold;
    color: var(--text-primary);
}

.example-arrow {
    color: var(--mc-grass);
    font-size: 1.2rem;
}

.example-command code {
    background: #1D1D1D;
    color: #5D9E31;
    padding: 0.8rem;
    border-radius: 2px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    border: 1px solid #3A3A3A;
    text-shadow: 0 0 6px rgba(93,158,49,0.4);
}

/* Guide Content */
.guide-content {
    max-width: 900px;
    margin: 3rem auto;
    background: var(--bg-secondary);
    border-radius: 15px;
    box-shadow: 0 10px 40px var(--card-shadow);
    overflow: hidden;
    animation: slideDown 0.4s ease;
}

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

.guide-header {
    background: #1D1D1D;
    background-image: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 31px,
        rgba(255,255,255,0.04) 31px,
        rgba(255,255,255,0.04) 32px
    );
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--mc-grass);
}

.guide-header h2 {
    color: white;
    margin: 0;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.2rem;
    text-shadow: 2px 2px #000;
    line-height: 1.5;
}

.btn-close {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-close:hover {
    background: rgba(255,255,255,0.3);
}

.guide-body {
    padding: 2.5rem;
}

.guide-body h3 {
    color: var(--text-primary);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--mc-grass);
    line-height: 1.5;
}

.guide-body h3:first-child {
    margin-top: 0;
}

.guide-body ul {
    list-style: none;
    padding: 0;
}

.guide-body li {
    padding: 0.8rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
    color: var(--text-secondary);
}

.guide-body li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--mc-grass);
    font-size: 1.2rem;
}

.guide-body strong {
    color: var(--text-primary);
}

/* News Section */
.news-section {
    padding: 80px 20px;
    background: linear-gradient(180deg, #5C5C5C 0%, #7F7F7F 100%);
}

.news-section h2 {
    text-align: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 2px 2px #000;
    line-height: 1.5;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.news-card {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px var(--card-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--card-shadow);
}

.news-badge {
    display: inline-block;
    background: var(--mc-gold);
    color: #1D1D1D;
    padding: 5px 15px;
    border-radius: 2px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
    box-shadow: 0 2px 0 rgba(0,0,0,0.3);
}

.news-card h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.news-date {
    color: var(--accent-blue);
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.news-card > p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.news-highlights {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.news-highlights li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    line-height: 1.6;
    border-bottom: 1px solid var(--border-color);
}

.news-highlights li:last-child {
    border-bottom: none;
}

.news-highlights strong {
    color: var(--text-primary);
}

/* Footer */
footer {
    background: #1D1D1D;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 31px,
        rgba(255,255,255,0.03) 31px,
        rgba(255,255,255,0.03) 32px
    );
    color: #AAAAAA;
    padding: 2.5rem 0;
    text-align: center;
    border-top: 4px solid var(--mc-grass);
    box-shadow: 0 -4px 0 #3D6B21;
}

footer p {
    margin: 0.5rem 0;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1100px) {
    /* Navigation Mobile */
    .hamburger {
        display: flex;
        margin-right: 0.8rem;
    }
    
    .nav-links {
        position: absolute;
        top: 62px;
        left: 0;
        right: 0;
        background: #1a1a1a;
        border-top: 2px solid #5D9E31;
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
        z-index: 200;
    }
    
    .nav-links.active {
        max-height: 520px;
        box-shadow: 0 10px 24px rgba(0,0,0,0.5);
    }
    
    .nav-links li {
        border-bottom: 1px solid rgba(255,255,255,0.07);
    }
    
    .nav-links a {
        display: block;
        padding: 0.95rem 1.4rem;
        font-size: 0.8rem !important;
        white-space: normal;
    }

    .nav-links a.mods-nav-link,
    .nav-links a.mod-editor-link {
        border-radius: 0;
        border: none;
        border-bottom: 1px solid rgba(255,255,255,0.07);
        box-shadow: none;
        padding: 0.95rem 1.4rem;
        opacity: 1;
    }

    .nav-links a.mod-editor-link {
        opacity: 0.6;
    }
    
    /* Settings Menu */
    .settings-menu {
        right: 10px;
        left: 10px;
        width: auto;
        top: auto;
        bottom: 70px;
    }
    
    .settings-btn {
        padding: 8px 14px;
        font-size: 1.15rem;
    }

    .navbar-right {
        gap: 0.8rem;
    }

    .auth-btn {
        padding: 8px 16px;
        font-size: 0.95rem;
    }

    .profile-menu {
        right: 10px;
        left: 10px;
        width: auto;
        top: auto;
        bottom: 70px;
    }
    
    /* Hero */
    .hero {
        padding: 60px 20px;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1.05rem;
    }
    
    /* Sections */
    .command-finder h2,
    .recipes h2,
    .features h2,
    .tips h2 {
        font-size: 1.95rem;
    }
    
    .subtitle {
        font-size: 1.02rem;
    }
    
    /* Search Box */
    .search-box {
        padding: 1.5rem;
        margin: 0 auto 2rem;
    }
    
    .search-box textarea {
        padding: 0.9rem;
        font-size: 1rem;
    }
    
    /* Cards */
    .cards {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    /* Tips Grid */
    .tips-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tip {
        padding: 1rem;
    }
    
    .tip h4 {
        font-size: 1.05rem;
    }
    
    .tip p {
        font-size: 0.95rem;
    }
    
    /* Recipe Items */
    .recipe-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    /* Command Examples */
    .command-examples {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .example-command {
        padding: 1rem;
    }
    
    /* Settings Menu Mobile */
    .setting-options {
        flex-direction: column;
    }
    
    .setting-option {
        width: 100%;
    }
    
    /* Footer */
    footer {
        padding: 1.5rem 20px;
    }
    
    footer p {
        font-size: 0.9rem;
    }
    
    /* Container padding */
    .container {
        padding: 0 15px;
    }
}

/* Very Small Screens (< 480px) */
@media (max-width: 480px) {
    .logo {
        font-size: 1.2rem;
    }
    
    .navbar {
        padding: 0.8rem 0;
    }
    
    .settings-btn {
        padding: 8px 12px;
        font-size: 1.1rem;
    }
    
    .settings-menu {
        width: calc(100% - 20px);
        right: 10px;
        left: 10px;
    }
    
    .settings-header h3 {
        font-size: 1rem;
    }
    
    .setting-option {
        padding: 0.7rem;
        font-size: 0.95rem;
    }
    
    .option-icon {
        font-size: 1.5rem;
    }
    
    /* Hero Very Small */
    .hero {
        padding: 40px 15px;
    }
    
    .hero-content h1 {
        font-size: 1.7rem;
    }
    
    .hero-content p {
        font-size: 0.98rem;
    }
    
    /* Sections Very Small */
    .command-finder h2,
    .recipes h2,
    .features h2,
    .tips h2 {
        font-size: 1.65rem;
        margin-bottom: 1.5rem;
    }
    
    .subtitle {
        font-size: 0.98rem;
        margin-bottom: 1.5rem;
    }
    
    /* Search Box Very Small */
    .search-box {
        padding: 1rem;
        margin: 0 auto 1.5rem;
    }
    
    .search-box textarea {
        padding: 0.8rem;
        font-size: 0.98rem;
    }
    
    .btn-search {
        padding: 12px 22px;
        font-size: 1rem;
        margin-top: 1rem;
    }
    
    /* Cards Very Small */
    .cards {
        gap: 1rem;
    }
    
    .card {
        padding: 1.2rem;
    }
    
    .card h3 {
        font-size: 1.2rem;
    }
    
    .card p {
        font-size: 0.92rem;
    }
    
    /* Tips Very Small */
    .tips-grid {
        gap: 1rem;
    }
    
    .tip {
        padding: 0.8rem;
    }
    
    .tip h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .tip p {
        font-size: 0.9rem;
    }
    
    /* Command Examples Very Small */
    .command-examples {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .example-command {
        padding: 0.75rem;
    }
    
    .example-command code {
        font-size: 0.9rem;
    }
    
    /* Guide Very Small */
    .guide-header h2 {
        font-size: 1.6rem;
    }
    
    .guide-body h3 {
        font-size: 1.2rem;
    }
    
    .guide-body li {
        font-size: 0.98rem;
    }
    
    /* Command Result Very Small */
    .command-result {
        padding: 1rem;
        gap: 0.8rem;
    }
    
    .command-box {
        gap: 0.5rem;
    }
    
    .command-box code {
        font-size: 0.95rem;
        padding: 0.7rem;
    }
    
    .btn-copy {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
}

/* === SECTION COMMENTAIRES === */
.comments-section {
    background-color: var(--bg-secondary);
    padding: 60px 20px;
    border-top: 2px solid var(--border-color);
    margin-top: 60px;
}

.comments-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.2rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.comment-form {
    max-width: 600px;
    margin: 0 auto 50px;
    background-color: var(--bg-primary);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--card-shadow);
}

.comment-form h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 15px;
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--mc-grass);
    box-shadow: 0 0 5px rgba(93, 158, 49, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

#charCount {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.comment-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--accent-green);
    color: white;
    border: none;
    border-radius: 2px;
    font-size: 0.8rem;
    font-family: 'Press Start 2P', monospace;
    font-weight: 400;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    box-shadow: inset -3px -4px 0 rgba(0,0,0,0.35), inset 3px 3px 0 rgba(255,255,255,0.15);
    text-shadow: 1px 1px #000;
}

.comment-btn:hover {
    background-color: #6DBB3A;
    transform: translateY(-1px);
    box-shadow: inset -3px -4px 0 rgba(0,0,0,0.35), inset 3px 3px 0 rgba(255,255,255,0.2);
}

.comment-btn:active {
    transform: translateY(1px);
    box-shadow: inset -1px -2px 0 rgba(0,0,0,0.35);
}

/* ============================================
   Tip of the Day (Hero)
   ============================================ */
.tip-of-day {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 30px;
    padding: 8px 18px;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: white;
    backdrop-filter: blur(4px);
    max-width: 90%;
    flex-wrap: wrap;
    justify-content: center;
}
.tip-badge {
    font-weight: 700;
    white-space: nowrap;
    color: #FFE082;
}

/* ============================================
   Visual Crafting Grid
   ============================================ */
.crafting-grid-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 16px auto 20px;
    flex-wrap: wrap;
}
.crafting-table-ui {
    background: #b8915a;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35), inset 0 2px 0 rgba(255,255,255,0.15);
    border: 3px solid #6e4a20;
}
.crafting-table-label {
    font-size: 0.68rem;
    color: #3e2200;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.crafting-grid {
    display: grid;
    grid-template-columns: repeat(3, 50px);
    grid-template-rows: repeat(3, 50px);
    gap: 3px;
}
.grid-cell {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    text-align: center;
    cursor: default;
    transition: transform 0.15s, box-shadow 0.15s;
    line-height: 1.2;
    padding: 3px;
    box-sizing: border-box;
    image-rendering: pixelated;
}
.grid-cell.empty {
    background: #4a3520;
    border: 2px solid #3a2810;
}
.grid-cell:not(.empty):hover {
    transform: scale(1.12);
    box-shadow: 0 3px 10px rgba(0,0,0,0.5);
    z-index: 2;
    position: relative;
}
.cell-label {
    display: block;
    line-height: 1.15;
    word-break: break-word;
    hyphens: auto;
}
.crafting-arrow {
    font-size: 2.2rem;
    color: var(--accent-green);
    font-weight: 900;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2));
}
.crafting-result {
    background: #b8915a;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    border: 3px solid #6e4a20;
    text-align: center;
}
.crafting-result-label {
    font-size: 0.68rem;
    color: #3e2200;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.result-cell {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    text-align: center;
    padding: 4px;
    line-height: 1.2;
    margin: 0 auto;
    box-shadow: inset 0 -3px 0 rgba(0,0,0,0.3);
}
.result-unknown {
    background: #4a3520;
    border: 3px solid #3a2810;
    color: #888;
    font-size: 1.5rem;
}

/* Dark theme adjustments */
[data-theme="dark"] .crafting-table-ui,
[data-theme="dark"] .crafting-result {
    box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}
[data-theme="dark"] .crafting-table-label,
[data-theme="dark"] .crafting-result-label {
    color: #d4a060;
}

/* Mobile adjustments for crafting grid */
@media (max-width: 480px) {
    .crafting-grid {
        grid-template-columns: repeat(3, 42px);
        grid-template-rows: repeat(3, 42px);
    }
    .grid-cell {
        width: 42px;
        height: 42px;
        font-size: 0.55rem;
    }
    .result-cell {
        width: 54px;
        height: 54px;
    }
    .crafting-grid-wrapper {
        gap: 10px;
    }
    .tip-of-day {
        font-size: 0.85rem;
        padding: 6px 14px;
    }
}

.comment-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    display: none;
}

.comment-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.comment-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.comments-list {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 2px 10px var(--card-shadow);
    padding: 15px;
    max-height: 420px;
    overflow-y: auto;
}

.comment-item {
    background-color: var(--bg-secondary);
    border-left: 4px solid var(--mc-grass);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 2px;
    box-shadow: 0 3px 0 rgba(0,0,0,0.2), 0 4px 8px var(--card-shadow);
    animation: slideIn 0.3s ease;
}

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

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-name {
    font-weight: 700;
    color: var(--mc-grass);
    font-size: 1rem;
}

.comment-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.comment-text {
    color: var(--text-primary);
    line-height: 1.6;
    word-break: break-word;
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.comment-action-btn {
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-action-btn:hover {
    transform: translateY(-1px);
    border-color: var(--accent-blue);
}

.comment-action-btn.delete {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.comment-action-btn.delete:hover {
    border-color: #e5989b;
}

.loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
    font-style: italic;
}

.no-comments {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
    font-size: 1.1rem;
}

/* Message pour utilisateurs non connectés */
.not-connected-message {
    background: #1D1D1D;
    border: 3px solid var(--mc-grass);
    border-radius: 2px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 6px 0 #3D6B21, 0 8px 20px rgba(0,0,0,0.4);
}

.not-connected-message p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.btn-connect {
    display: inline-block;
    background: var(--mc-grass);
    color: white;
    padding: 12px 30px;
    border-radius: 2px;
    text-decoration: none;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    font-weight: 400;
    transition: transform 0.1s, box-shadow 0.1s;
    border: none;
    cursor: pointer;
    text-shadow: 1px 1px #000;
    box-shadow: inset -3px -4px 0 rgba(0,0,0,0.35), inset 3px 3px 0 rgba(255,255,255,0.15);
}

.btn-connect:hover {
    background: #6DBB3A;
    transform: translateY(-1px);
    box-shadow: inset -3px -4px 0 rgba(0,0,0,0.35), inset 3px 3px 0 rgba(255,255,255,0.2);
}

.btn-connect:active {
    transform: translateY(1px);
}

/* Responsive */
@media (max-width: 768px) {
    .comments-section {
        padding: 40px 15px;
    }

    .comments-section h2 {
        font-size: 1.5rem;
    }

    .comment-form {
        padding: 20px;
    }

    .comment-item {
        padding: 15px;
    }
}

/* ============================
   Section IA Chat — Style ChatGPT
   ============================ */

.ai-section {
    padding: 60px 20px 0;
    background: #212121;
    position: relative;
}

/* AI Coming Soon Overlay */
.ai-coming-soon-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-coming-soon-box {
  text-align: center;
  color: #fff;
  padding: 40px 30px;
}

.ai-coming-soon-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  animation: ai-pulse 2s infinite;
}

@keyframes ai-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.ai-coming-soon-box h3 {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.1rem;
  color: #00e5ff;
  margin-bottom: 12px;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.6);
}

.ai-coming-soon-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  color: #4CAF50;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.ai-coming-soon-sub {
  font-size: 0.9rem;
  color: #aaa;
  max-width: 300px;
  margin: 0 auto;
  line-height: 1.6;
}

.ai-plans-btn {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  background: linear-gradient(135deg, #2a2a2a, #1e1e1e);
  color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 3px 0 #0a0a0a, 0 5px 18px rgba(0, 229, 255, 0.12);
  transition: transform 0.1s, box-shadow 0.1s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ai-plans-btn:hover {
  border-color: rgba(0, 229, 255, 0.7);
  color: #fff;
  box-shadow: 0 3px 0 #0a0a0a, 0 6px 22px rgba(0, 229, 255, 0.25);
  transform: translateY(-1px);
}

.ai-plans-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0a0a0a, 0 2px 8px rgba(0, 229, 255, 0.1);
}

.ai-section h2 {
    text-align: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 2px 2px #000;
    line-height: 1.5;
}

.ai-section .subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Non connecté */
.ai-not-connected {
    text-align: center;
    padding: 3rem 2rem 4rem;
    max-width: 500px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
}

.ai-not-connected .btn-connect {
    display: inline-block;
    margin-top: 1.2rem;
    padding: 12px 28px;
    background: var(--mc-grass);
    color: white;
    border-radius: 2px;
    text-decoration: none;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    font-weight: 400;
    text-shadow: 1px 1px #000;
    box-shadow: inset -3px -4px 0 rgba(0,0,0,0.35), inset 3px 3px 0 rgba(255,255,255,0.15);
    transition: transform 0.1s, box-shadow 0.1s;
}

.ai-not-connected .btn-connect:hover {
    background: #6DBB3A;
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: inset -3px -4px 0 rgba(0,0,0,0.35), inset 3px 3px 0 rgba(255,255,255,0.2);
}

/* Wrapper chat */
.ai-chat-wrapper {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* Barre d'usage */
.ai-usage-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.82rem;
}

.ai-usage-track {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.ai-usage-fill {
    height: 100%;
    background: var(--mc-grass);
    border-radius: 4px;
    width: 0%;
    transition: width 0.4s ease, background 0.4s ease;
}

/* Boîte de chat */
.ai-chat-box {
    background: transparent;
    border: none;
    padding: 0.5rem 0;
    height: 460px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0.5rem;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
}

.ai-chat-box::-webkit-scrollbar {
    width: 6px;
}
.ai-chat-box::-webkit-scrollbar-track {
    background: transparent;
}
.ai-chat-box::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

/* Messages */
.ai-message {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    width: 100%;
}

.ai-message.ai-user {
    flex-direction: row-reverse;
    gap: 0;
}

/* Avatar IA */
.ai-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Bulle IA — pas de fond, texte libre */
.ai-message.ai-ai .ai-bubble {
    background: transparent;
    border-radius: 0;
    padding: 0.15rem 0;
    max-width: calc(100% - 52px);
    line-height: 1.75;
    color: #ECECEC;
    font-size: 1rem;
    white-space: pre-wrap;
    word-break: break-word;
    box-shadow: none;
}

/* Bulle utilisateur — pilule sombre à droite */
.ai-message.ai-user .ai-bubble {
    background: #2F2F2F;
    border-radius: 18px 18px 4px 18px;
    padding: 0.85rem 1.2rem;
    max-width: 70%;
    color: #ECECEC;
    line-height: 1.65;
    font-size: 1rem;
    white-space: pre-wrap;
    word-break: break-word;
    box-shadow: none;
    border: 1px solid #3A3A3A;
}

/* Dots de chargement */
.ai-loading-bubble {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 0.4rem 0;
    background: transparent;
}

.ai-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #888;
    animation: aiDotBounce 1.2s infinite ease-in-out;
}

.ai-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes aiDotBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40% { transform: translateY(-5px); opacity: 1; }
}

/* Limite atteinte */
.ai-limit-reached {
    text-align: center;
    padding: 0.8rem 1.2rem;
    background: rgba(231, 76, 60, 0.12);
    border: 1px solid rgba(231, 76, 60, 0.35);
    border-radius: 10px;
    color: #e87c74;
    margin-bottom: 0.8rem;
    font-size: 0.92rem;
}

/* Zone de saisie — pilule avec bouton intégré */
.ai-input-row {
    position: relative;
    background: #2F2F2F;
    border-radius: 16px;
    border: 1px solid #444;
    display: flex;
    align-items: flex-end;
    padding: 0.65rem 0.65rem 0.65rem 1.1rem;
    gap: 0.5rem;
    transition: border-color 0.2s;
    margin-bottom: 1.5rem;
}

.ai-input-row:focus-within {
    border-color: #666;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
}

.ai-input-row textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: #ECECEC;
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    padding: 0.3rem 0;
    max-height: 160px;
    line-height: 1.5;
    overflow-y: auto;
}

.ai-input-row textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.ai-input-row textarea:focus {
    outline: none;
}

.ai-input-row textarea:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ai-send-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    background: var(--mc-grass);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.1s;
    color: white;
    padding: 0;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.3);
}

.ai-send-btn:hover:not(:disabled) {
    background: #6DBB3A;
    transform: scale(1.05);
}

.ai-send-btn:active:not(:disabled) {
    transform: scale(0.96);
}

.ai-send-btn:disabled {
    background: #3A3A3A;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive */
@media (max-width: 600px) {
    .ai-chat-box {
        height: 340px;
    }

    .ai-usage-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .ai-usage-track {
        width: 100%;
    }
}
