/* Variables de Color */
:root {
    --primary-dark: #2C3E50;
    --primary-blue: #3498DB;
    --light-blue: #EBF5FB;
    --bg-light: #F4F6F7;
    --white: #FFFFFF;
    --success: #27AE60;
    --error: #E74C3C;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--primary-dark);
}

/* Header & Toolbar */
header {
    background-color: var(--white);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

header h1 {
    font-size: 1.5rem;
    color: var(--primary-blue);
}

.toolbar-btns button {
    background-color: transparent;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 8px 15px;
    margin-left: 10px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.toolbar-btns button:hover {
    background-color: var(--primary-blue);
    color: var(--white);
}

.toolbar-btns .btn-coach {
    background-color: var(--primary-dark);
    color: white;
    border: none;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Sidebar Navigation */
.module-nav {
    flex: 1 1 250px;
    background: var(--white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

.module-nav h3 {
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 1rem;
    color: #7F8C8D;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.module-nav ul {
    list-style: none;
}

.module-nav li {
    padding: 12px;
    margin-bottom: 5px;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.module-nav li:hover {
    background: var(--light-blue);
}

.module-nav li.active {
    background: var(--light-blue);
    color: var(--primary-blue);
    border-left: 3px solid var(--primary-blue);
}

/* Workspace & SPA Views */
.workspace {
    flex: 3 1 600px;
    background: var(--white);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    min-height: 60vh;
}

.view-content {
    display: none;
}

.view-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Generic Exercise Styles */
.exercise-title {
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.grammar-focus {
    display: inline-block;
    background: var(--light-blue);
    color: var(--primary-blue);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-weight: bold;
}

/* Unit 1: Matching Game Styles */
.match-container {
    display: flex;
    gap: 40px;
    margin-top: 30px;
}

.match-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.match-btn {
    padding: 15px;
    border: 2px solid #E5E7E9;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.2s;
    font-weight: 500;
    color: var(--primary-dark);
}

.match-btn:hover:not(.disabled) {
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

.match-btn.selected {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.match-btn.correct {
    background: var(--success);
    color: white;
    border-color: var(--success);
    cursor: default;
}

.match-btn.incorrect {
    background: var(--error);
    color: white;
    border-color: var(--error);
    animation: shake 0.3s;
}

.match-btn.disabled {
    pointer-events: none;
    opacity: 0.9;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.feedback-msg {
    margin-top: 20px;
    font-weight: bold;
    font-size: 1.1rem;
    height: 24px;
    text-align: center;
}

/* --- Workbook Lab Styles --- */
.workbook-exercise {
    background: #FAFAFA;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #E5E7E9;
    margin-top: 20px;
}

.fill-blanks-list {
    margin-left: 20px;
    line-height: 2.2;
    margin-bottom: 20px;
}

.fill-blanks-list li {
    margin-bottom: 15px;
}

/* Inputs para completar espacios */
.wb-input {
    border: none;
    border-bottom: 2px solid var(--primary-dark);
    background: transparent;
    outline: none;
    font-size: 1rem;
    color: var(--primary-blue);
    width: 100px;
    text-align: center;
    font-weight: bold;
    transition: all 0.3s;
    font-family: inherit;
}

.wb-input:focus {
    border-bottom-color: var(--primary-blue);
    width: 120px;
    /* Se expande un poco al enfocar */
}

/* Estados de validación */
.wb-input.correct {
    border-bottom-color: var(--success);
    color: var(--success);
}

.wb-input.incorrect {
    border-bottom-color: var(--error);
    color: var(--error);
}

.action-btn {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: 0.2s;
}

.action-btn:hover {
    background: #2980B9;
    transform: translateY(-2px);
}