/* ========================================
   ICTU GRADES APP - MAIN CSS FILE
   ======================================== */

/* --------------------
   RESET & BASE STYLES
   -------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    color: #000000;
    line-height: 1.6;
    overflow-x: hidden;
    /* Smooth scrolling */
    scroll-behavior: smooth;
}

/* Global animation variables */
:root {
    --transition-fast: 0.15s ease-out;
    --transition-normal: 0.25s ease-out;
    --transition-slow: 0.35s ease-out;
    --transition-bounce: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-light: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-medium: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-heavy: 0 8px 32px rgba(0,0,0,0.16);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: #000000;
        color: #ffffff;
    }
}

/* --------------------
   DESKTOP LAYOUT
   -------------------- */
.app-container {
    display: flex;
    height: 100vh;
    background: #ffffff;
}

.sidebar {
    width: 320px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.main-content {
    flex: 1;
    background: #ffffff;
    overflow-y: auto;
    padding: 0;
}

/* --------------------
   SIDEBAR STYLES
   -------------------- */
.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #ffffff;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 4px;
}

.sidebar-subtitle {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.header-user-info {
    margin-top: 12px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-user-info span {
    font-size: 13px;
    font-weight: 500;
    color: #000000;
}

.header-logout-btn {
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.header-logout-btn:hover {
    background: #333333;
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

.header-logout-btn:active {
    transform: translateY(0);
    transition: all var(--transition-fast);
}

/* --------------------
   LOGIN SECTION
   -------------------- */
.login-section {
    padding: 40px 20px;
    text-align: center;
}

.login-redirect-content {
    max-width: 280px;
    margin: 0 auto;
}

.redirect-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.redirect-title {
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 8px;
}

.redirect-subtitle {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* --------------------
   USER INFO
   -------------------- */
.user-info {
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info span {
    font-size: 14px;
    font-weight: 500;
    color: #000000;
}

.logout-btn {
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.logout-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all var(--transition-smooth);
}

.logout-btn:hover {
    background: #333333;
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

.logout-btn:hover::before {
    width: 200px;
    height: 200px;
}

.logout-btn:active {
    transform: translateY(0);
    transition: all var(--transition-fast);
}

/* --------------------
   COURSES LIST
   -------------------- */
.courses-list {
    flex: 1;
    overflow-y: auto;
}

.course-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.course-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: #000000;
    transform: scaleY(0);
    transition: transform var(--transition-bounce);
}

.course-item:hover {
    background: #f8f9fa;
    transform: translateX(4px);
    box-shadow: var(--shadow-light);
}

.course-item:hover::before {
    transform: scaleY(1);
}

.course-item.active {
    background: #000000;
    color: #ffffff;
    transform: translateX(4px);
    box-shadow: var(--shadow-medium);
}

.course-item.active::before {
    transform: scaleY(1);
    background: #ffffff;
}

.course-item.active .course-name,
.course-item.active .course-code,
.course-item.active .course-stats {
    color: #ffffff;
}

.course-name {
    font-size: 15px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 4px;
    line-height: 1.4;
}

.course-code {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 8px;
}

.course-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.grade-count {
    color: #6c757d;
    font-weight: 500;
}

.avg-score {
    color: #000000;
    font-weight: 600;
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 12px;
}

/* --------------------
   MAIN CONTENT
   -------------------- */
.content-header {
    padding: 32px 40px 24px;
    border-bottom: 1px solid #f0f0f0;
    background: #ffffff;
}

.content-title {
    font-size: 28px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 8px;
}

.content-subtitle {
    font-size: 16px;
    color: #6c757d;
    font-weight: 500;
}

/* Grade Filter */
.grade-filter {
    margin-top: 20px;
    padding: 16px 20px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 12px;
}

.filter-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e9ecef;
    background: #fff;
    color: #6c757d;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-bounce);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0,0,0,0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all var(--transition-smooth);
}

.filter-btn:hover {
    border-color: #000000;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.filter-btn:hover::before {
    width: 100%;
    height: 100%;
}

.filter-btn.active {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.filter-btn:active {
    transform: translateY(0);
    transition: all var(--transition-fast);
}

/* --------------------
    GRADES CONTAINER
    -------------------- */
.grades-container {
    padding: 32px 40px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 22px;
    min-height: calc(100vh - 200px);
    align-items: start;
    justify-items: start;
}

.grade-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 22px;
    box-shadow: var(--shadow-light);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 200px;
    width: 100%;
}

.grade-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left var(--transition-slow);
}

.grade-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-heavy);
}

.grade-card:hover::before {
    left: 100%;
}

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

.grade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.grade-type {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.grade-type.quiz {
    background: #e3f2fd;
    color: #1976d2;
}

.grade-type.weekly {
    background: #f3e5f5;
    color: #7b1fa2;
}

.grade-score {
    font-size: 26px;
    font-weight: 700;
    padding: 9px 18px;
    border-radius: 8px;
    min-width: 65px;
    text-align: center;
}

.score-excellent {
    background: #e8f5e8;
    color: #2e7d32;
}

.score-good {
    background: #fff3e0;
    color: #f57c00;
}

.score-average {
    background: #fff8e1;
    color: #f9a825;
}

.score-poor {
    background: #ffebee;
    color: #c62828;
}

.grade-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    flex: 1;
    margin-top: 6px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 14px;
    color: #000000;
    font-weight: 600;
}

.grade-note {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    grid-column: 1 / -1;
}

/* --------------------
     EMPTY STATES
     -------------------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    animation: fadeIn 0.6s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    grid-column: 1 / -1;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: bounce 1s ease-out 0.3s both;
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 8px;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.empty-subtitle {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.5;
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* --------------------
   BUTTONS
   -------------------- */
.btn-primary {
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-bounce);
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all var(--transition-smooth);
}

.btn-primary:hover {
    background: #333333;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:active {
    transform: translateY(0);
    transition: all var(--transition-fast);
}

/* --------------------
   MESSAGES
   -------------------- */
.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 14px;
    border: 1px solid #ffcdd2;
    animation: slideInDown 0.4s ease-out;
    box-shadow: var(--shadow-light);
}

.success-message {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 14px;
    border: 1px solid #c8e6c9;
    animation: slideInDown 0.4s ease-out;
    box-shadow: var(--shadow-light);
}

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

/* --------------------
   MOBILE LAYOUT
   -------------------- */
.mobile-app {
    display: none;
    flex-direction: column;
    height: 100vh;
    background: #ffffff;
}

.m-header {
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.m-title {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 2px;
}

.m-user {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
}

.m-actions {
    display: flex;
    gap: 8px;
}

.m-btn {
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.m-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all var(--transition-smooth);
}

.m-btn:hover {
    background: #333333;
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

.m-btn:hover::before {
    width: 200px;
    height: 200px;
}

.m-btn:active {
    transform: translateY(0);
    transition: all var(--transition-fast);
}

.m-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.m-card {
    margin: 16px 20px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-light);
    transition: all var(--transition-smooth);
    animation: slideInUp 0.5s ease-out;
}

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

.m-login-redirect {
    text-align: center;
    padding: 20px;
}

.m-login-redirect .icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.m-login-redirect .title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #000000;
}

.m-login-redirect .subtitle {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 16px;
}

.m-primary {
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-bounce);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.m-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all var(--transition-smooth);
}

.m-primary:hover {
    background: #333333;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.m-primary:hover::before {
    width: 400px;
    height: 400px;
}

.m-primary:active {
    transform: translateY(0);
    transition: all var(--transition-fast);
}

.m-tabs {
    display: flex;
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.m-tab {
    flex: 1;
    padding: 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all var(--transition-smooth);
    border-bottom: 2px solid transparent;
    position: relative;
}

.m-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #000000;
    transform: translateX(-50%);
    transition: width var(--transition-bounce);
}

.m-tab:hover {
    color: #000000;
    background: rgba(0,0,0,0.02);
}

.m-tab.active {
    color: #000000;
}

.m-tab.active::after {
    width: 100%;
}

.m-grade-filter {
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.m-course {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.m-course::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: #000000;
    transform: scaleY(0);
    transition: transform var(--transition-bounce);
}

.m-course:hover {
    background: #f8f9fa;
    transform: translateX(4px);
    box-shadow: var(--shadow-light);
}

.m-course:hover::before {
    transform: scaleY(1);
}

.m-course-code {
    font-size: 13px;
    color: #6c757d;
    margin-top: 4px;
}

.m-badge {
    background: #f8f9fa;
    color: #000000;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.m-grade {
    margin: 16px 20px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-light);
    transition: all var(--transition-smooth);
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.m-grade-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.m-chip {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.m-chip.quiz {
    background: #e3f2fd;
    color: #1976d2;
}

.m-chip.weekly {
    background: #f3e5f5;
    color: #7b1fa2;
}

.m-score {
    font-size: 20px;
    font-weight: 700;
    color: #000000;
}

.m-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.m-meta .label {
    font-size: 11px;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.m-meta .value {
    font-size: 13px;
    color: #000000;
    font-weight: 600;
}

.m-grade-note {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
}

.m-grade-note .note-label {
    font-weight: 700;
    color: #000000;
}

.m-bottom {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
}

.m-search {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    color: #000000;
    transition: all var(--transition-smooth);
}

.m-search:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

/* --------------------
     LOGIN PAGE STYLES
     -------------------- */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    padding: 20px;
}

.login-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    font-size: 48px;
    margin-bottom: 16px;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: #6c757d;
}

.login-form {
    margin-bottom: 24px;
}

.form-group {
    position: relative;
    margin-bottom: 24px;
}

.form-group input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    background: #ffffff;
    color: #000000;
    transition: all var(--transition-smooth);
    position: relative;
}

.form-group input:hover {
    border-color: #000000;
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-group input:focus {
    outline: none;
    border-color: #000000;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Override browser autofill styles */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus,
.form-group input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #ffffff inset !important;
    -webkit-text-fill-color: #000000 !important;
    background-color: #ffffff !important;
    background-clip: content-box !important;
}

.form-group label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    top: 0;
    font-size: 12px;
    color: #000000;
    transform: translateY(-50%) scale(0.85);
    font-weight: 500;
    background: #ffffff;
    padding: 0 8px;
    border-radius: 4px;
    z-index: 2;
}

.login-btn {
    width: 100%;
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all var(--transition-smooth);
}

.login-btn:hover {
    background: #333333;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.login-btn:hover::before {
    width: 400px;
    height: 400px;
}

.login-btn:active {
    transform: translateY(0);
    transition: all var(--transition-fast);
}

.login-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.loader {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Loading animation for content */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Pulse animation for notifications */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Bounce animation for success states */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

.bounce {
    animation: bounce 1s;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
}

.login-footer p {
    font-size: 12px;
    color: #6c757d;
}

/* --------------------
    RESPONSIVE DESIGN
    -------------------- */
@media (max-width: 768px) {
    .app-container {
        display: none;
    }
    
    .mobile-app {
        display: flex;
    }
    
    .grades-container {
        grid-template-columns: 1fr;
        padding: 16px 20px;
        min-height: calc(100vh - 300px);
        align-items: start;
        justify-items: start;
    }
    
    .content-header {
        padding: 20px;
    }
    
    .content-title {
        font-size: 24px;
    }
    
    .content-subtitle {
        font-size: 14px;
    }
    
    .empty-state {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        grid-column: 1 / -1;
        padding: 40px 20px;
    }
    
    .empty-icon {
        font-size: 40px;
    }
    
    .empty-title {
        font-size: 16px;
    }
    
    .empty-subtitle {
        font-size: 13px;
    }
}

/* --------------------
   UTILITY CLASSES
   -------------------- */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.login-form { 
    display: block; 
}

.login-form.hidden { 
    display: none; 
}

/* --------------------
   HIDE/SHOW ELEMENTS
   -------------------- */
.user-info { 
    display: block; 
}

#userInfo { 
    display: none !important; 
}
