/* 50 Sounds Practice - Reusable Components */

/* ===========================================
   Form Elements
   =========================================== */
input, button, select {
    padding: 12px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin: 5px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-height: 44px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

button {
    background: var(--accent-primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

button:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-hover);
}

/* ===========================================
   Progress Bar & Statistics
   =========================================== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: var(--accent-primary);
    transition: width 0.5s ease;
    border-radius: 4px;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    flex-wrap: wrap;
}

.stat-item {
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: 10px;
    min-width: 120px;
    margin: 5px;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-primary);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===========================================
   Modal Windows
   =========================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: var(--bg-secondary);
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    min-height: 200px;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* ===========================================
   Cards
   =========================================== */
.session-card {
    background: var(--bg-tertiary);
    padding: 10px;
    margin: 5px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    min-height: 80px;
    contain: layout;
}

.session-card:hover {
    background: var(--border-color);
}

.category-card {
    background: var(--bg-tertiary);
    padding: 10px;
    margin: 5px 0;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
    contain: layout;
}

/* ===========================================
   Answer Records
   =========================================== */
.answer-record {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 6px;
    font-size: 14px;
}

.answer-correct {
    background: rgba(39, 174, 96, 0.1);
    border-left: 4px solid #27ae60;
}

.answer-incorrect {
    background: rgba(231, 76, 60, 0.1);
    border-left: 4px solid #e74c3c;
}

/* ===========================================
   Theme Toggle Button
   =========================================== */
body::after {
    content: '';
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    pointer-events: none;
    z-index: 998;
}

.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--shadow-hover);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    will-change: transform;
}

.theme-toggle:hover {
    background: var(--accent-secondary);
    transform: scale(1.1);
    box-shadow: 0 6px 20px var(--shadow-hover);
}

.theme-toggle:active {
    transform: scale(0.95);
}
