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

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: #0a0a0f;
    color: #e4e4e7;
    min-height: 100vh;
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* --- Background animated --- */
.bg-glow {
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(145, 71, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: pulseGlow 6s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    0% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    100% { opacity: 1; transform: translateX(-50%) scale(1.15); }
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 60px 24px 40px;
    position: relative;
    z-index: 1;
}

/* --- Header --- */
header {
    text-align: center;
    margin-bottom: 48px;
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #9147ff, #6d28d9);
    border-radius: 16px;
    margin-bottom: 16px;
    box-shadow: 0 0 40px rgba(145, 71, 255, 0.3);
}

.logo svg {
    width: 36px;
    height: 36px;
    fill: white;
}

header h1 {
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #c4a1ff 0%, #9147ff 40%, #6d28d9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

header p {
    color: #71717a;
    font-size: 1.05rem;
    font-weight: 400;
}

/* --- Login Screen --- */
.login-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

.login-card {
    background: rgba(24, 24, 30, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid #27272a;
    border-radius: 20px;
    padding: 48px 40px;
    max-width: 440px;
    width: 100%;
}

.login-card .logo {
    margin-bottom: 24px;
}

.login-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f4f4f5;
    margin-bottom: 10px;
}

.login-card p {
    color: #71717a;
    font-size: 0.95rem;
    margin-bottom: 32px;
    line-height: 1.5;
}

.btn-discord {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    background: #5865F2;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.3);
    text-decoration: none;
}

.btn-discord:hover {
    background: #4752c4;
    box-shadow: 0 6px 30px rgba(88, 101, 242, 0.45);
    transform: translateY(-1px);
}

.btn-discord svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.login-error {
    background: rgba(127, 29, 29, 0.3);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 14px 18px;
    border-radius: 10px;
    margin-top: 20px;
    font-size: 0.9rem;
    display: none;
}

.login-error.visible {
    display: block;
}

/* --- User bar --- */
.user-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin-bottom: 24px;
    padding: 10px 16px;
    background: rgba(24, 24, 30, 0.6);
    border: 1px solid #1f1f23;
    border-radius: 12px;
}

.user-bar .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.user-bar .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #9147ff;
}

.user-bar .user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #e4e4e7;
}

.btn-logout {
    padding: 6px 16px;
    border: 1px solid #27272a;
    border-radius: 8px;
    background: transparent;
    color: #71717a;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-logout:hover {
    border-color: #ef4444;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.08);
}

/* --- App content (hidden until logged in) --- */
.app-content {
    display: none;
}

.app-content.visible {
    display: block;
}

/* --- Tabs --- */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    background: rgba(24, 24, 30, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid #27272a;
    border-radius: 14px;
    padding: 5px;
}

.tab {
    flex: 1;
    padding: 13px 20px;
    text-align: center;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: #71717a;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.tab.active {
    background: linear-gradient(135deg, #9147ff, #7c3aed);
    color: white;
    box-shadow: 0 4px 20px rgba(145, 71, 255, 0.35);
}

.tab:hover:not(.active) {
    background: rgba(145, 71, 255, 0.08);
    color: #a78bfa;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* --- Cards --- */
.card {
    background: rgba(24, 24, 30, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid #27272a;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    transition: border-color 0.3s;
}

.card:hover {
    border-color: #3f3f46;
}

.card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: #f4f4f5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h2 .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(145, 71, 255, 0.15);
    border-radius: 8px;
    font-size: 1rem;
}

/* --- Presets --- */
.presets-section {
    margin-bottom: 28px;
}

.presets-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #a1a1aa;
}

.presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.preset-card {
    background: rgba(15, 15, 20, 0.8);
    border: 1px solid #27272a;
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.preset-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 12px 12px 0 0;
}

.preset-card[data-style="sombre"]::before { background: linear-gradient(90deg, #6366f1, #4338ca); }
.preset-card[data-style="fun"]::before { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.preset-card[data-style="chill"]::before { background: linear-gradient(90deg, #06b6d4, #3b82f6); }
.preset-card[data-style="tryhard"]::before { background: linear-gradient(90deg, #ef4444, #dc2626); }
.preset-card[data-style="creatif"]::before { background: linear-gradient(90deg, #ec4899, #a855f7); }
.preset-card[data-style="irl"]::before { background: linear-gradient(90deg, #10b981, #059669); }
.preset-card[data-style="horreur"]::before { background: linear-gradient(90deg, #991b1b, #450a0a); }
.preset-card[data-style="retro"]::before { background: linear-gradient(90deg, #d97706, #b45309); }

.preset-card:hover {
    border-color: #9147ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.preset-card.active {
    border-color: #9147ff;
    background: rgba(145, 71, 255, 0.08);
    box-shadow: 0 0 0 1px rgba(145, 71, 255, 0.3);
}

.preset-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #f4f4f5;
    margin-bottom: 4px;
}

.preset-style {
    font-size: 0.8rem;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.preset-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: none;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    font-size: 0.75rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.preset-card:hover .preset-delete {
    display: flex;
}

.preset-delete:hover {
    background: #ef4444;
    color: white;
}

.add-preset-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.add-preset-row input,
.add-preset-row select {
    padding: 9px 14px;
    border-radius: 8px;
    border: 1px solid #27272a;
    background: #0f0f14;
    color: #e4e4e7;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.add-preset-row input:focus,
.add-preset-row select:focus {
    outline: none;
    border-color: #9147ff;
}

.add-preset-row input {
    flex: 1;
    min-width: 160px;
}

.add-preset-row select option {
    background: #18181b;
}

.btn-add-preset {
    padding: 9px 18px;
    border-radius: 8px;
    border: 1px solid #9147ff;
    background: rgba(145, 71, 255, 0.1);
    color: #a78bfa;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-add-preset:hover {
    background: #9147ff;
    color: white;
}

/* --- Form --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 7px;
    color: #a1a1aa;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #27272a;
    background: rgba(15, 15, 20, 0.8);
    color: #e4e4e7;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.25s ease;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #9147ff;
    box-shadow: 0 0 0 3px rgba(145, 71, 255, 0.1);
}

.form-group select option {
    background: #18181b;
    color: #e4e4e7;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* --- Buttons --- */
.btn-generate {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #9147ff 0%, #7c3aed 50%, #6d28d9 100%);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(145, 71, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-generate:hover {
    box-shadow: 0 6px 30px rgba(145, 71, 255, 0.45);
    transform: translateY(-1px);
}

.btn-generate:active {
    transform: translateY(0) scale(0.99);
}

.btn-generate:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- Results --- */
.results {
    margin-top: 28px;
}

.results h3 {
    font-size: 1rem;
    margin-bottom: 14px;
    color: #a1a1aa;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-item {
    background: rgba(15, 15, 20, 0.8);
    border: 1px solid #27272a;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    transition: all 0.25s ease;
}

.result-item:hover {
    border-color: #9147ff;
    box-shadow: 0 0 0 1px rgba(145, 71, 255, 0.15);
    transform: translateX(4px);
}

.result-item .text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #f4f4f5;
}

.btn-copy {
    padding: 7px 16px;
    border: 1px solid rgba(145, 71, 255, 0.4);
    border-radius: 8px;
    background: rgba(145, 71, 255, 0.08);
    color: #a78bfa;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-copy:hover {
    background: #9147ff;
    border-color: #9147ff;
    color: white;
}

.btn-copy.copied {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

/* --- Loading --- */
.loading {
    text-align: center;
    padding: 40px;
    color: #71717a;
}

.spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #27272a;
    border-top-color: #9147ff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Error --- */
.error-msg {
    background: rgba(127, 29, 29, 0.3);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 14px 18px;
    border-radius: 10px;
    margin-top: 16px;
    font-size: 0.9rem;
}

/* --- History --- */
.history-section {
    margin-top: 32px;
}

.history-section h3 {
    font-size: 0.95rem;
    margin-bottom: 14px;
    color: #71717a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.btn-clear {
    padding: 5px 14px;
    border: 1px solid #27272a;
    border-radius: 8px;
    background: transparent;
    color: #71717a;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-clear:hover {
    border-color: #ef4444;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.08);
}

.history-item {
    background: rgba(15, 15, 20, 0.6);
    border: 1px solid #1f1f23;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 8px;
    font-size: 0.88rem;
}

.history-item .meta {
    color: #52525b;
    font-size: 0.78rem;
    margin-bottom: 6px;
    font-weight: 500;
}

/* --- Notification Preview --- */
.notification-preview {
    background: linear-gradient(135deg, rgba(15, 15, 30, 0.9), rgba(20, 20, 50, 0.9));
    border: 1px solid rgba(145, 71, 255, 0.25);
    border-radius: 14px;
    padding: 22px;
    margin-top: 14px;
    backdrop-filter: blur(12px);
    transition: all 0.25s;
}

.notification-preview:hover {
    border-color: rgba(145, 71, 255, 0.5);
    box-shadow: 0 0 30px rgba(145, 71, 255, 0.08);
}

.notification-preview .notif-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.notif-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #9147ff, #6d28d9);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(145, 71, 255, 0.3);
}

.notif-label {
    font-weight: 700;
    color: #a78bfa;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.notif-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #f4f4f5;
}

.notif-body {
    color: #a1a1aa;
    font-size: 0.93rem;
    line-height: 1.55;
}

/* --- Maintenance Screen --- */
.maintenance-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

.maintenance-screen.visible {
    display: flex;
}

.maintenance-card {
    background: rgba(24, 24, 30, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid #27272a;
    border-radius: 20px;
    padding: 48px 40px;
    max-width: 480px;
    width: 100%;
}

.maintenance-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: rgba(245, 158, 11, 0.12);
    border-radius: 18px;
    margin-bottom: 24px;
    font-size: 2rem;
}

.maintenance-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 10px;
}

.maintenance-card p {
    color: #71717a;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- Admin Panel --- */
.admin-panel {
    background: rgba(24, 24, 30, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 24px;
    display: none;
}

.admin-panel.visible {
    display: block;
}

.admin-panel h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-panel h3 .admin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: rgba(245, 158, 11, 0.15);
    border-radius: 6px;
    font-size: 0.75rem;
}

.admin-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-controls .control-label {
    font-size: 0.9rem;
    color: #a1a1aa;
    font-weight: 500;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #27272a;
    border-radius: 28px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: #71717a;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider {
    background: #f59e0b;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
    background: white;
}

.maintenance-status {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
    transition: all 0.3s;
}

.maintenance-status.off {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.maintenance-status.on {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

/* --- Bouton Patchnotes (user bar) --- */
.btn-patchnotes {
    position: relative;
    padding: 6px 16px;
    border: 1px solid rgba(145, 71, 255, 0.4);
    border-radius: 8px;
    background: rgba(145, 71, 255, 0.08);
    color: #a78bfa;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-patchnotes:hover {
    background: #9147ff;
    border-color: #9147ff;
    color: white;
}

.patchnote-badge {
    display: none;
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.patchnote-badge.visible {
    display: block;
}

/* --- Admin Patchnotes Section --- */
.admin-divider {
    height: 1px;
    background: rgba(245, 158, 11, 0.15);
    margin: 18px 0;
}

.admin-subtitle {
    font-size: 0.82rem;
    font-weight: 700;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}

.patchnote-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.patchnote-input {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #27272a;
    background: #0f0f14;
    color: #e4e4e7;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.patchnote-input:focus {
    outline: none;
    border-color: #f59e0b;
}

.patchnote-textarea {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #27272a;
    background: #0f0f14;
    color: #e4e4e7;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s;
}

.patchnote-textarea:focus {
    outline: none;
    border-color: #f59e0b;
}

.btn-publish {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    align-self: flex-start;
}

.btn-publish:hover {
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
    transform: translateY(-1px);
}

.admin-patchnotes-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-patchnotes-list .admin-subtitle {
    margin-top: 4px;
}

.admin-patchnote-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(15, 15, 20, 0.6);
    border: 1px solid #1f1f23;
    border-radius: 8px;
}

.admin-patchnote-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.admin-patchnote-info strong {
    font-size: 0.88rem;
    color: #e4e4e7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-patchnote-date {
    font-size: 0.75rem;
    color: #52525b;
}

.btn-delete-patchnote {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-delete-patchnote:hover {
    background: #ef4444;
    color: white;
}

/* --- Patchnotes Modal Items --- */
.patchnote-item {
    padding: 20px 0;
    border-bottom: 1px solid #27272a;
}

.patchnote-item:first-child {
    padding-top: 0;
}

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

.patchnote-item-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.patchnote-item-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f4f4f5;
    margin: 0;
}

.patchnote-date {
    font-size: 0.78rem;
    color: #52525b;
    white-space: nowrap;
}

.patchnote-content {
    color: #a1a1aa;
    font-size: 0.9rem;
    line-height: 1.65;
}

/* --- Footer --- */
.site-footer {
    margin-top: 60px;
    padding: 24px 0;
    border-top: 1px solid #1f1f23;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.copyright {
    color: #52525b;
    font-size: 0.82rem;
    font-weight: 500;
}

.footer-link {
    color: #71717a;
    font-size: 0.82rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #a78bfa;
}

/* --- CGU Modal --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay.visible {
    display: flex;
}

.modal {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 16px;
    max-width: 720px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.25s ease;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 16px;
    border-bottom: 1px solid #27272a;
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f4f4f5;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #27272a;
    background: transparent;
    color: #71717a;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    border-color: #ef4444;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.08);
}

.modal-body {
    padding: 24px 28px 28px;
    overflow-y: auto;
    line-height: 1.7;
    color: #a1a1aa;
    font-size: 0.9rem;
}

.modal-body .cgu-date {
    color: #52525b;
    font-size: 0.82rem;
    font-style: italic;
    margin-bottom: 24px;
}

.modal-body h3 {
    color: #e4e4e7;
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 8px;
}

.modal-body h3:first-of-type {
    margin-top: 0;
}

.modal-body p {
    margin-bottom: 10px;
}

.modal-body ul {
    margin: 8px 0 12px 20px;
    padding: 0;
}

.modal-body ul li {
    margin-bottom: 4px;
}

/* --- Responsive --- */
@media (max-width: 640px) {
    header h1 { font-size: 1.7rem; }
    .container { padding: 24px 14px; }
    .form-row { grid-template-columns: 1fr; }
    .presets-grid { grid-template-columns: 1fr 1fr; }
    .add-preset-row { flex-direction: column; }
    .add-preset-row input { min-width: auto; }
    .login-card { padding: 32px 24px; }
    .footer-content { justify-content: center; text-align: center; }
    .modal { max-height: 90vh; }
    .modal-header { padding: 18px 20px 14px; }
    .modal-body { padding: 18px 20px 22px; }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(161, 161, 170, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(161, 161, 170, 0.35);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(161, 161, 170, 0.2) transparent;
}
