:root {
    --bg-color: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --panel-border: rgba(255, 255, 255, 0.1);
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #10b981;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --error: #ef4444;
    --success: #22c55e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.app-container {
    display: flex;
    height: 100vh;
    padding: 20px;
    gap: 20px;
}

/* Sidebar */
.sidebar {
    width: 280px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #60a5fa, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.nav-item:hover, .nav-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.nav-item.active {
    border-left: 4px solid var(--primary);
    background: linear-gradient(90deg, rgba(59,130,246,0.1) 0%, transparent 100%);
}

.nav-item i {
    font-size: 1.2rem;
}

/* Main Content */
.content-area {
    flex: 1;
    position: relative;
    overflow-y: auto;
}

.activity-section {
    display: none;
    padding: 40px;
    min-height: 100%;
}

.activity-section.active {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

.hero-header {
    margin-bottom: 40px;
}

.hero-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

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

.dash-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    padding: 24px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s;
}

.dash-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.dash-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 16px;
    display: block;
}

/* Activity specific styles */
.activity-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 20px;
}

.game-container {
    max-width: 800px;
}

.story-text {
    font-size: 1.1rem;
    line-height: 2;
    color: #cbd5e1;
}

/* Naufragio Selects */
.verb-select {
    background: rgba(15, 23, 42, 0.6);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 6px;
    padding: 2px 8px;
    font-family: 'Outfit';
    font-weight: 600;
    cursor: pointer;
    outline: none;
    appearance: none;
}
.verb-select.correct {
    border-color: var(--success);
    color: var(--success);
    background: rgba(34, 197, 94, 0.1);
}
.verb-select.incorrect {
    border-color: var(--error);
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

/* Buttons */
.actions {
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.mt-1 { margin-top: 20px; }

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    font-family: 'Outfit';
}

.btn.primary {
    background: var(--primary);
    color: white;
}
.btn.primary:hover {
    background: var(--primary-hover);
}
.btn.secondary {
    background: rgba(255,255,255,0.1);
    color: white;
}
.btn.secondary:hover {
    background: rgba(255,255,255,0.2);
}

.score-display {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Drag and drop */
.word-bank {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    min-height: 80px;
}
.draggable-word {
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: grab;
    font-weight: 600;
}
.drop-zone {
    display: inline-block;
    min-width: 100px;
    height: 30px;
    border-bottom: 2px dashed var(--text-muted);
    margin: 0 8px;
    vertical-align: bottom;
    text-align: center;
    color: var(--accent);
    font-weight: bold;
}
.drop-zone.filled {
    border-bottom-style: solid;
    border-color: var(--primary);
}
.drop-zone.correct { border-color: var(--success); color: var(--success); }
.drop-zone.incorrect { border-color: var(--error); color: var(--error); }

/* Forms */
.modern-form .form-group {
    margin-bottom: 20px;
}
.modern-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
}
.modern-form input, .modern-form textarea, .editorial-builder input, .editorial-builder select, .editorial-builder textarea {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--panel-border);
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-family: 'Outfit';
}
.modern-form textarea, .editorial-builder textarea { resize: vertical; }

.city-card, .magazine-cover {
    margin-top: 30px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(16,185,129,0.2));
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.2);
    text-align: center;
}

/* Quiz */
.quiz-question {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
}
.quiz-question h3 { margin-bottom: 15px; }
.quiz-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--panel-border);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: 0.2s;
}
.quiz-btn:hover { background: rgba(255,255,255,0.1); }
.quiz-btn.selected-correct { background: rgba(34,197,94,0.2); border-color: var(--success); }
.quiz-btn.selected-incorrect { background: rgba(239,68,68,0.2); border-color: var(--error); }

/* Editor Builder */
.builder-step { display: none; }
.builder-step.active { display: block; animation: slideUp 0.3s ease; }
.builder-step h3 { margin-bottom: 20px; }
.magazine-cover h1 { font-size: 3rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 10px;}
.magazine-cover .tone-badge { display: inline-block; padding: 4px 12px; background: var(--primary); border-radius: 20px; font-size: 0.8rem; margin-bottom: 20px;}

.hidden { display: none !important; }

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

/* Challenge Timer */
.text-center { text-align: center; }
.timer-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}
.timer-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    width: 100%;
}
#opt1.correct, #opt2.correct { background: var(--success) !important; color: white !important; border-color: var(--success); }
#opt1.incorrect, #opt2.incorrect { background: var(--error) !important; color: white !important; border-color: var(--error); }

/* Responsive adjustments */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        padding: 10px;
        gap: 10px;
    }
    
    .sidebar {
        width: 100%;
        padding: 15px;
        gap: 15px;
        border-radius: 12px;
    }
    
    .nav-links {
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
    }
    
    .nav-item {
        flex-shrink: 0;
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    
    .nav-item i {
        font-size: 1.1rem;
    }
    
    .nav-item.active {
        border-left: none;
        border-bottom: 3px solid var(--primary);
        background: linear-gradient(0deg, rgba(59,130,246,0.1) 0%, transparent 100%);
    }
    
    .activity-section {
        padding: 20px 15px;
    }
    
    .hero-header h1 {
        font-size: 1.8rem;
    }
    
    .dash-card {
        padding: 15px;
    }
    
    .story-text {
        font-size: 1rem;
        line-height: 1.8;
    }
    
    .word-bank {
        padding: 15px;
        gap: 8px;
    }
    
    .draggable-word {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .magazine-cover h1 {
        font-size: 2rem;
    }
    
    .actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

.scm-section {
    border-top: 1px solid var(--panel-border);
    padding-top: 20px;
    margin-top: 30px;
}
.scm-section h3 {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}


