/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-dark: #070913;
    --bg-sidebar: rgba(10, 14, 26, 0.75);
    --bg-panel: rgba(16, 22, 40, 0.4);
    --bg-card: rgba(26, 36, 65, 0.25);
    --bg-input: rgba(8, 11, 22, 0.6);
    
    --border-color: rgba(255, 255, 255, 0.05);
    --border-hover: rgba(99, 102, 241, 0.3);
    --border-active: rgba(99, 102, 241, 0.6);
    
    --color-primary: #6366f1;       /* Indigo */
    --color-secondary: #00e5ff;     /* Cyber Cyan */
    --color-accent: #8b5cf6;        /* Violet */
    --color-success: #10b981;       /* Emerald */
    --color-warning: #f59e0b;       /* Amber */
    --color-danger: #ef4444;        /* Red */
    
    --text-main: #f8fafc;           /* Slate 50 */
    --text-muted: #94a3b8;          /* Slate 400 */
    --text-dark: #475569;           /* Slate 600 */
    
    --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gradient-secondary: linear-gradient(135deg, #00e5ff, #3b82f6);
    --gradient-success: linear-gradient(135deg, #10b981, #059669);
    
    --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.15);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --sidebar-width: 290px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.2) transparent;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 15%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 90% 85%, rgba(0, 229, 255, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
    background-attachment: fixed;
    line-height: 1.5;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
}

/* Redesigned 3-Column Layout */
.app-container {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
}

/* Column 1: App Left Sidebar */
.app-sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    flex-direction: column;
    padding: 2.25rem 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    justify-content: space-between;
    z-index: 100;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 2rem;
}

.brand-logo-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.35rem;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.brand-info h3 {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
}

.brand-info p {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Curriculum Switcher Pill */
.curriculum-toggle-pill {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.25rem;
    display: flex;
    gap: 0.25rem;
    margin-bottom: 2rem;
}

.curriculum-toggle-pill button {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.55rem 0.25rem;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.curriculum-toggle-pill button.active {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    box-shadow: var(--shadow-premium);
}

/* Navigation Links */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1;
}

.sidebar-nav button.nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
    transition: all 0.2s ease;
    width: 100%;
}

.sidebar-nav button.nav-link i {
    font-size: 1rem;
    transition: transform 0.2s ease;
    width: 18px;
    text-align: center;
}

.sidebar-nav button.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.03);
}

.sidebar-nav button.nav-link.active {
    background: rgba(99, 102, 241, 0.06);
    color: #ffffff;
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: inset 0 0 12px rgba(99, 102, 241, 0.1);
}

.sidebar-nav button.nav-link.active i {
    color: var(--color-primary);
    transform: scale(1.1);
}

/* Sidebar Footer Profile block */
.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
    margin-top: 1.5rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.user-profile .avatar {
    font-size: 1.75rem;
    color: var(--text-muted);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info .username {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-info .role {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--border-color);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-logout:hover {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Column 2: Scrollable Workspace Content */
.app-content-wrapper {
    height: 100vh;
    overflow-y: auto;
    padding: 2.25rem;
}

/* Tab Containers */
.tab-content {
    display: none;
    animation: fadeIn 0.35s ease;
}

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

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

/* Playbook Top Nav Pill Bar */
.playbook-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.month-selector-pills {
    display: flex;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.25rem;
    gap: 0.25rem;
    overflow-x: auto;
}

.month-selector-pills button.month-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.month-selector-pills button.month-btn.active {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.month-progress-dot {
    font-size: 0.65rem;
    background: rgba(255,255,255,0.1);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-weight: 800;
}

.month-selector-pills button.month-btn.active .month-progress-dot {
    background: rgba(255,255,255,0.2);
}

/* Stat Pill Badges */
.top-stats-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.5rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.stat-pill.streak {
    border-color: rgba(245, 158, 11, 0.2);
    background: rgba(245, 158, 11, 0.03);
}

.stat-pill.streak i {
    color: var(--color-warning);
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.4));
}

.stat-pill.freeze {
    cursor: pointer;
    border-color: rgba(0, 229, 255, 0.2);
    background: rgba(0, 229, 255, 0.03);
    transition: all 0.2s ease;
}

.stat-pill.freeze:hover {
    border-color: var(--color-secondary);
    background: rgba(0, 229, 255, 0.08);
}

.stat-pill.freeze i {
    color: var(--color-secondary);
}

.progress-pill {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.5rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.progress-bar-container {
    width: 70px;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.4s ease;
}

/* Horizontal Days progress grid section */
.days-carousel-section {
    margin-bottom: 1.5rem;
}

.days-carousel-section h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
}

.day-grid-container {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.65rem;
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
}

.day-grid {
    display: flex;
    gap: 0.45rem;
}

.day-btn {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    background: var(--bg-panel);
    color: var(--text-muted);
    position: relative;
}

.day-btn.completed {
    border-color: rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.06);
    color: var(--color-success);
}

.day-btn.active {
    border-color: var(--border-active);
    background: rgba(99, 102, 241, 0.1);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
}

.day-btn.completed::after {
    content: '';
    position: absolute;
    bottom: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-success);
}

/* Playbook Workspace 2-Column Grid Layout */
.playbook-workspace-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1.75rem;
    align-items: start;
}

@media (max-width: 1200px) {
    .playbook-workspace-grid {
        grid-template-columns: 1fr;
    }
}

.theater-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.companion-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Premium Panel Card Base */
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-premium);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.85rem;
    margin-bottom: 1.15rem;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1rem;
    font-weight: 700;
}

.panel-title i {
    color: var(--color-primary);
}

/* Cinematic Player Box */
.player-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
    transition: border-color 0.3s ease;
    margin-bottom: 1.25rem;
}

.player-container:hover {
    border-color: var(--border-active);
}

.player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.external-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.15rem;
    padding: 2.5rem;
    text-align: center;
    background: radial-gradient(circle, #121829 0%, #060912 100%);
}

.external-fallback i {
    font-size: 3.25rem;
    color: var(--color-secondary);
    filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.4));
}

.external-fallback h3 {
    font-size: 1.15rem;
    font-weight: 800;
}

.external-fallback p {
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 380px;
    line-height: 1.4;
}

.btn-external {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: opacity 0.2s;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-external:hover {
    opacity: 0.9;
}

/* Timeline Timetable Slots */
.slots-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.slot-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.85rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 1rem;
}

.slot-card:hover {
    border-color: var(--border-hover);
    background: rgba(99, 102, 241, 0.03);
    transform: translateX(4px);
}

.slot-card.active {
    border-color: var(--border-active);
    background: rgba(99, 102, 241, 0.05);
}

.slot-info {
    flex: 1;
}

.slot-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.slot-name {
    font-size: 0.88rem;
    font-weight: 700;
    margin-top: 0.15rem;
}

.slot-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    line-height: 1.35;
}

.slot-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--text-dark);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.slot-checkbox::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.68rem;
    color: transparent;
}

.slot-card.completed .slot-checkbox {
    border-color: var(--color-success);
    background: var(--color-success);
}

.slot-card.completed .slot-checkbox::after {
    color: white;
}

.slot-card.completed .slot-name {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Focused Study Timer dial */
.timer-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    justify-content: space-between;
}

.timer-circle-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.timer-svg {
    transform: rotate(-90deg);
}

.timer-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.03);
    stroke-width: 2.5;
}

.timer-progress {
    fill: none;
    stroke: var(--color-secondary);
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

.timer-time-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.timer-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.timer-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 700;
}

.timer-buttons {
    display: flex;
    gap: 0.5rem;
}

.timer-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.timer-btn:hover {
    border-color: var(--border-hover);
    color: #ffffff;
}

.timer-btn.primary {
    background: var(--gradient-secondary);
    color: #070913;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 229, 255, 0.25);
}

.ambient-controls {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.25rem;
}

.ambient-btn {
    border: 1px solid var(--border-color);
    background: transparent;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.ambient-btn.active {
    background: rgba(0, 229, 255, 0.06);
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}

/* Playbook notes */
.playbook-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.playbook-textarea {
    width: 100%;
    min-height: 180px;
    border-radius: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 0.85rem;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.82rem;
    resize: vertical;
    line-height: 1.45;
    transition: border-color 0.2s ease;
}

.playbook-textarea:focus {
    border-color: var(--border-active);
    outline: none;
}

.note-templates-bar {
    display: flex;
    gap: 0.35rem;
}

.template-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-btn:hover {
    color: white;
    border-color: rgba(255,255,255,0.1);
}

.save-status {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

.save-status.saved i {
    color: var(--color-success);
}

/* Tasks lists */
.tasks-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.task-item:hover {
    border-color: rgba(255,255,255,0.06);
}

.task-item-label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.78rem;
    cursor: pointer;
    flex: 1;
}

.task-checkbox-round {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--text-dark);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.task-item.completed .task-checkbox-round {
    border-color: var(--color-success);
    background: var(--color-success);
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.btn-delete-task {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.2rem;
    transition: color 0.2s ease;
}

.btn-delete-task:hover {
    color: var(--color-danger);
}

/* Inputs and Forms */
.task-input-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.task-text-input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    height: 36px;
    border-radius: 8px;
    padding: 0 0.75rem;
    color: #ffffff;
    font-size: 0.8rem;
}

.task-text-input:focus {
    border-color: var(--border-active);
    outline: none;
}

.btn-add-task {
    background: var(--gradient-primary);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* AI Tutor Chat */
.chat-container {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.75rem;
    min-height: 520px;
}

@media (max-width: 900px) {
    .chat-container {
        grid-template-columns: 1fr;
    }
}

.chat-active-panel-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}

.chat-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
}

.chat-messages-box {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 350px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.message-bubble {
    display: flex;
    flex-direction: column;
    max-width: 75%;
    padding: 0.8rem 1.15rem;
    border-radius: 14px;
    font-size: 0.82rem;
    line-height: 1.45;
}

.message-bubble.student {
    background: var(--bg-card);
    align-self: flex-end;
    border-top-right-radius: 2px;
    border: 1px solid rgba(255,255,255,0.03);
}

.message-bubble.tutor {
    background: rgba(99, 102, 241, 0.07);
    border: 1px solid rgba(99, 102, 241, 0.15);
    align-self: flex-start;
    border-top-left-radius: 2px;
}

.chat-chips-scroll {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.25rem 0;
}

.chat-chip {
    flex: 0 0 auto;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-chip:hover {
    border-color: var(--border-hover);
    background: rgba(255,255,255,0.04);
}

/* API Setup Panel overlay */
.api-key-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.25rem;
    max-width: 480px;
    margin: 2rem auto;
    text-align: center;
    box-shadow: var(--shadow-premium);
}

/* Weekly Projects / Homework list */
.assignment-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: var(--shadow-premium);
}

.assignment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.assignment-status-badge {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
}

.assignment-status-badge.pending {
    background: rgba(245, 158, 11, 0.08);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.assignment-status-badge.graded {
    background: rgba(16, 185, 129, 0.08);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Tables and Admin controls styling */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.85rem;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
}

/* General Layout utilities */
.hidden {
    display: none !important;
}

.form-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 0.65rem 0.85rem;
    color: white;
    font-family: var(--font-body);
    font-size: 0.82rem;
    border-radius: 8px;
}

.form-input:focus {
    outline: none;
    border-color: var(--border-active);
}

.btn-submit {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-weight: 700;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    font-size: 0.82rem;
    cursor: pointer;
    text-align: center;
}

/* Mobile responsive fixes */
.mobile-tabs {
    display: none;
}

@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    .app-sidebar {
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem;
    }
    .app-content-wrapper {
        height: auto;
        padding: 1.25rem;
    }
    .sidebar-footer {
        display: none;
    }
}

/* ==========================================================================
   AI TECHNICAL INTERVIEW PRACTICE COMPONENT STYLES
   ========================================================================== */

/* Glassmorphism & Glowing Indicators */
.interview-glass-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.3s ease;
}

.interview-glass-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.glow-ai-border {
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.1);
    animation: glowBorderAI 4s infinite alternate;
}

.glow-camera-border {
    border: 1px solid rgba(0, 229, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
    animation: glowBorderCam 4s infinite alternate;
}

.glow-recording-border {
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.15);
    animation: pulseRedBorder 1.5s infinite;
}

/* Bouncing Audio Wave Visualization */
.audio-wave-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    height: 32px;
    width: 60px;
    margin: 0 auto;
}

.audio-wave-bar {
    width: 4px;
    height: 6px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transform-origin: bottom;
    transition: height 0.1s ease;
}

.audio-wave-container.speaking .audio-wave-bar {
    animation: waveBounce 0.8s infinite ease-in-out alternate;
}

.audio-wave-container.speaking .audio-wave-bar:nth-child(1) { animation-delay: 0.1s; }
.audio-wave-container.speaking .audio-wave-bar:nth-child(2) { animation-delay: 0.3s; }
.audio-wave-container.speaking .audio-wave-bar:nth-child(3) { animation-delay: 0.0s; }
.audio-wave-container.speaking .audio-wave-bar:nth-child(4) { animation-delay: 0.4s; }
.audio-wave-container.speaking .audio-wave-bar:nth-child(5) { animation-delay: 0.2s; }

/* Female Interviewer Avatar (Sci-Fi Cyber Theme) */
.avatar-container {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    background: rgba(139, 92, 246, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-glow {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #00e5ff);
    z-index: 1;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.avatar-container.speaking .avatar-glow {
    opacity: 0.85;
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.6), 0 0 10px rgba(0, 229, 255, 0.4);
    animation: avatarPulse 2s infinite ease-in-out;
}

.interview-avatar-img {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
    border: 3px solid #0a0e1a;
    background: #0f172a;
}

/* Webcam Mirror Layout styling */
.camera-feed-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    background: #000000;
}

.camera-feed-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Mirror effect */
}

.camera-feed-video.hidden-mirror {
    opacity: 0 !important;
}

.camera-feed-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.85rem;
    z-index: 10;
}

.camera-feed-tag {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.camera-feed-tag.recording-pulse {
    border-color: rgba(239, 68, 68, 0.4);
}

.camera-feed-tag.recording-pulse i {
    color: var(--color-danger);
    animation: blinkLight 1s infinite;
}

/* Transcripts display */
.live-transcript-box {
    background: rgba(8, 11, 22, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem;
    min-height: 80px;
    max-height: 140px;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-main);
}

/* Pulsing Mic buttons */
.pulse-mic-btn {
    position: relative;
    border-radius: 50%;
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.15rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.pulse-mic-btn.idle {
    background: var(--gradient-primary);
}

.pulse-mic-btn.recording {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
    animation: pulseRecordingBtn 1.5s infinite;
}

/* Scoring Ring (Dashboard) */
.score-radial-progress {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto;
}

.score-radial-progress svg {
    transform: rotate(-90deg);
}

.score-radial-value {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Collapsible Breakdown lists */
.collapsible-header {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.85rem 1.15rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.collapsible-header:hover {
    background: rgba(255, 255, 255, 0.04);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid transparent;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.collapsible-content.expanded {
    max-height: 1000px;
    padding: 1.15rem;
    border-color: var(--border-color);
    transition: max-height 0.3s ease-in-out;
}

/* Animations declarations */
@keyframes waveBounce {
    0% { transform: scaleY(0.3); }
    100% { transform: scaleY(1.8); }
}

@keyframes avatarPulse {
    0% { transform: scale(1); box-shadow: 0 0 15px rgba(139, 92, 246, 0.4); }
    50% { transform: scale(1.02); box-shadow: 0 0 25px rgba(139, 92, 246, 0.6), 0 0 15px rgba(0, 229, 255, 0.4); }
    100% { transform: scale(1); box-shadow: 0 0 15px rgba(139, 92, 246, 0.4); }
}

@keyframes blinkLight {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes pulseRecordingBtn {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes glowBorderAI {
    0% { border-color: rgba(139, 92, 246, 0.3); box-shadow: 0 0 10px rgba(139, 92, 246, 0.05); }
    100% { border-color: rgba(139, 92, 246, 0.65); box-shadow: 0 0 20px rgba(139, 92, 246, 0.25); }
}

@keyframes glowBorderCam {
    0% { border-color: rgba(0, 229, 255, 0.3); box-shadow: 0 0 10px rgba(0, 229, 255, 0.05); }
    100% { border-color: rgba(0, 229, 255, 0.65); box-shadow: 0 0 20px rgba(0, 229, 255, 0.25); }
}

@keyframes pulseRedBorder {
    0%, 100% { border-color: rgba(239, 68, 68, 0.4); box-shadow: 0 0 10px rgba(239, 68, 68, 0.1); }
    50% { border-color: rgba(239, 68, 68, 0.85); box-shadow: 0 0 20px rgba(239, 68, 68, 0.35); }
}

