* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.font-inter {
    font-family: 'Inter', sans-serif;
}

/* Glass Morphism Card */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(203, 213, 225, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

/* Stat Card */
.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: rgba(203, 213, 225, 0.8);
}

/* Custom Select */
.custom-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 12px;
    color: #1e293b;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    outline: none;
}

.custom-select:hover {
    border-color: rgba(148, 163, 184, 0.8);
    background: rgba(255, 255, 255, 1);
}

.custom-select:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.custom-select option {
    background: #ffffff;
    color: #1e293b;
    padding: 12px;
}

/* Custom Input */
.custom-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 12px;
    color: #1e293b;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
}

.custom-input:hover {
    border-color: rgba(148, 163, 184, 0.8);
    background: rgba(255, 255, 255, 1);
}

.custom-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.custom-input::placeholder {
    color: #94a3b8;
}

/* Buttons */
.btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

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

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.95);
    color: #475569;
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(248, 250, 252, 1);
    border-color: rgba(148, 163, 184, 0.8);
    transform: translateY(-2px);
}

/* Table Styles */
table {
    border-collapse: separate;
    border-spacing: 0;
}

tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

tbody tr:hover {
    background: rgba(139, 92, 246, 0.05);
    cursor: pointer;
}

tbody td {
    padding: 16px;
}

/* Student Row */
.student-row {
    transition: all 0.2s ease;
}

.student-row:hover {
    background: rgba(139, 92, 246, 0.08);
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.status-inactive {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

/* Session Card */
.session-card {
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.session-card:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(203, 213, 225, 0.8);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* View Transcript Link */
.view-transcript {
    color: #8b5cf6;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.view-transcript:hover {
    color: #a78bfa;
    text-decoration: underline;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    overflow: hidden;
    /* Prevent background scroll */
}

.modal-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 20px;
    padding: 32px;
    max-width: 1200px;
    /* Increased from 800px */
    width: 90%;
    max-height: 85vh;
    /* Increased from 80vh */
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
    overflow: hidden;
    /* Prevent overflow on the container */
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.8);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.4);
    border-radius: 10px;
}


.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.6);
}

/* Transcript Chat Styles */
.transcript-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 12px;
}

.message {
    display: flex;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
}

.message.ai-tutor {
    justify-content: flex-start;
}

.message.student {
    justify-content: flex-end;
}

.message-content {
    max-width: 70%;
    padding: 14px 18px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
}

.message.ai-tutor .message-content {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(167, 139, 250, 0.08) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-bottom-left-radius: 4px;
}

.message.student .message-content {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(96, 165, 250, 0.08) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-bottom-right-radius: 4px;
}

.message-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    opacity: 0.7;
}

.message.ai-tutor .message-label {
    color: #7c3aed;
}

.message.student .message-label {
    color: #2563eb;
    text-align: right;
}

.message-text {
    color: #1e293b;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message-timestamp {
    font-size: 10px;
    color: #64748b;
    margin-top: 6px;
    opacity: 0.6;
}

.message.ai-tutor .message-timestamp {
    text-align: left;
}

.message.student .message-timestamp {
    text-align: right;
}


/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Loading Animation */
.loading-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .glass-card {
        padding: 16px;
    }

    .stat-card {
        padding: 16px;
    }

    .modal-content {
        padding: 20px;
        width: 95%;
    }

    table {
        font-size: 14px;
    }

    tbody td {
        padding: 12px 8px;
    }
}

/* Smooth Transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Auth Styles */
#loginView {
    position: fixed;
    inset: 0;
    overflow: hidden;
    background: #f8fafc;
}

.login-bg-animate {
    position: absolute;
    inset: 0;
    background: linear-gradient(-45deg, #fce7f3, #dbeafe, #f3e8ff, #ecfdf5);
    background-size: 400% 400%;
    animation: gradientBG 20s ease infinite;
    /* Slower */
    opacity: 0.4;
    /* Toned down */
    z-index: 1;
}

.login-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(#8b5cf6 1.5px, transparent 1.5px);
    /* Slightly larger */
    background-size: 50px 50px;
    animation: movePattern 60s linear infinite;
    /* Very slow drift */
    opacity: 0.2;
    /* Discernible but subtle */
    z-index: 2;
}

/* Decorative Geometric Shapes */
.decor-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 3;
}

.decor-shape {
    position: absolute;
    border: 1px solid rgba(139, 92, 246, 0.15);
    opacity: 0.6;
}

.decor-circle-1 {
    width: 600px;
    height: 600px;
    border-radius: 50%;
    top: -150px;
    left: -150px;
}

.decor-circle-2 {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    top: -50px;
    left: -50px;
}

.decor-square-1 {
    width: 300px;
    height: 300px;
    top: 50px;
    left: 100px;
    transform: rotate(45deg);
}

.decor-square-2 {
    width: 200px;
    height: 200px;
    top: 200px;
    left: -20px;
    transform: rotate(15deg);
}

/* Pulse Animation for Login Card (Subtle Border Glow) */
@keyframes cardPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0), 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1), 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0), 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    }
}

.login-content-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#googleBtnContainer {
    min-height: 44px;
}

.login-card {
    max-width: 580px !important;
    /* Slightly bigger still */
    width: 90%;
    padding: 3.5rem !important;
    animation: cardPulse 4s ease-in-out infinite;
}

#loginLogo {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 4rem !important;
    /* Maximized vertical space */
}

#loginLogo:hover {
    transform: scale(1.1) rotate(2deg);
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes movePattern {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 60px 60px;
    }
}