* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    background-attachment: fixed;
    color: white;
    min-height: 100vh;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Cards */
.card {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid #475569;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: #64748b;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #60a5fa 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Grid */
.grid {
    display: grid;
    gap: 16px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Stats Box */
.stat-box {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #64748b;
    transition: all 0.3s ease;
}

.stat-label {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
}

.stat-value-large {
    font-size: 32px;
}

/* Buttons */
button {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
}

button:active:not(:disabled) {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-blue { background: #2563eb; }
.btn-blue:hover:not(:disabled) { background: #1d4ed8; }

.btn-green { background: #16a34a; }
.btn-green:hover:not(:disabled) { background: #15803d; }

.btn-purple { background: #9333ea; }
.btn-purple:hover:not(:disabled) { background: #7e22ce; }

.btn-red { background: #dc2626; }
.btn-red:hover:not(:disabled) { background: #b91c1c; }

.btn-yellow { background: #ca8a04; }
.btn-yellow:hover:not(:disabled) { background: #a16207; }

.btn-orange { background: #ea580c; }
.btn-orange:hover:not(:disabled) { background: #c2410c; }

/* Badge */
.badge {
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.badge[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    border: 1px solid #334155;
}

.badge-locked {
    background: #334155;
    opacity: 0.5;
    border-color: #475569;
}

.badge-yellow {
    background: linear-gradient(135deg, #ca8a04 0%, #ea580c 100%);
    border-color: #ea580c;
}

/* Menu Screen — FIX FOOTER */
.menu-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 24px;
}

.menu-card {
    max-width: 500px;
    width: 100%;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid #475569;
}

.menu-title {
    font-size: 48px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.menu-subtitle {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 32px;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Revenue List */
.revenue-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.revenue-item {
    display: flex;
    justify-content: space-between;
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #2563eb;
    transition: all 0.2s ease;
}

.revenue-item:hover {
    transform: translateX(4px);
    border-left-color: #10b981;
}

.revenue-positive {
    color: #4ade80;
    font-weight: bold;
}

.revenue-negative {
    color: #f87171;
    font-weight: bold;
}

/* Stock Price Display */
.stock-price {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 2px solid #2563eb;
}

.stock-price-value {
    font-size: 36px;
    font-weight: bold;
    color: #4ade80;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
}

/* Spacing */
.space-y-3 > * + * { margin-top: 12px; }
.space-y-4 > * + * { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-4 { margin-top: 16px; }

/* Age Display */
.age-display {
    display: flex;
    gap: 20px;
    align-items: center;
}

.age-label, .crises-label {
    font-size: 16px;
    font-weight: bold;
    color: #cbd5e1;
    background: #334155;
    padding: 8px 12px;
    border-radius: 6px;
}

/* Notifications */
.notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.notification {
    padding: 12px 16px;
    border-radius: 8px;
    animation: slideIn 0.3s ease-out, slideOut 3s ease-out 2.7s forwards;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.notification-info    { background: #3b82f6; color: white; }
.notification-success { background: #10b981; color: white; }
.notification-error   { background: #ef4444; color: white; }
.notification-positive{ background: #4ade80; color: white; }
.notification-negative{ background: #f87171; color: white; }
.notification-crisis  { background: #dc2626; color: white; font-weight: bold; }

@keyframes slideIn {
    from { transform: translateX(400px); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0);     opacity: 1; }
    to   { transform: translateX(400px); opacity: 0; }
}

/* Form Styles */
.settings-form { margin-bottom: 24px; }

.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #cbd5e1;
}

.form-input, .form-select, .form-slider {
    width: 100%;
    padding: 12px;
    border: 1px solid #475569;
    border-radius: 8px;
    background: #334155;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.3);
}

.form-slider {
    padding: 0;
    height: 6px;
    cursor: pointer;
}

/* Save Slots */
.save-slots {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.save-slot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 2px solid #475569;
    border-radius: 8px;
    background: #334155;
    transition: all 0.3s ease;
}

.save-slot.save-exists {
    border-color: #10b981;
    background: linear-gradient(135deg, #334155 0%, #1e3a2e 100%);
}

.save-slot.save-empty { opacity: 0.6; }

.save-slot:hover.save-exists {
    border-color: #4ade80;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.save-info strong {
    display: block;
    margin-bottom: 4px;
    color: #4ade80;
}

.save-info p {
    font-size: 14px;
    color: #cbd5e1;
    margin-bottom: 4px;
}

.save-info small {
    font-size: 12px;
    color: #94a3b8;
}

.save-actions {
    display: flex;
    gap: 8px;
}

.save-actions .btn-green,
.save-actions .btn-red {
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
}

/* Footer — séparé de la carte grâce au gap du menu-screen */
.footer {
    max-width: 500px;
    width: 100%;
    text-align: center;
    padding: 16px 20px;
    color: #94a3b8;
    border-top: 1px solid #475569;
}

.footer p {
    margin-bottom: 12px;
    font-size: 14px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #60a5fa;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.footer-links a:hover {
    color: #4ade80;
    transform: translateY(-2px);
}

/* Hidden */
.hidden { display: none; }