:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --red-yt: #ff0000;
    --border: #334155;
    --gradient-1: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.app-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s ease;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.tab-btn.active {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Generator */
.generator-section {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.generate-btn {
    background: var(--gradient-1);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.generate-btn:active {
    transform: translateY(1px);
}

.secondary-btn {
    margin-top: 1.5rem;
    width: 100%;
    justify-content: center;
}

/* Content Area */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.tab-content.active {
    display: block;
}

.category-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.category-header h2 {
    font-size: 2rem;
    color: var(--text-primary);
}

.category-header p {
    color: var(--text-secondary);
}

/* Cards */
.exercise-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.exercise-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
}

.exercise-card.concept-card::before {
    background: #8b5cf6;
}

.exercise-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-header h3 {
    font-size: 1.3rem;
}

.yt-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,0,0,0.1);
    color: #ff4444;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.yt-link:hover {
    background: #ff4444;
    color: white;
}

.card-body p {
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

.card-body p strong {
    color: var(--text-primary);
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.exercise-badge {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.concept-badge {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

/* Theory List */
.theory-list {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.theory-item {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.theory-item:hover {
    transform: translateX(5px);
    border-color: var(--accent);
}

.theory-num {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-right: 1rem;
    min-width: 45px;
    text-align: center;
}

.theory-title {
    flex-grow: 1;
    font-weight: 500;
}

.theory-item i {
    color: #ff4444;
    font-size: 1.2rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: var(--text-secondary);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: white;
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--accent);
}

.routine-item {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid var(--accent);
}

.routine-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.routine-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.routine-item.concept-item {
    border-left-color: #8b5cf6;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.2rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
}
