/* Blake Study Platform - Sydney Grammar Theme */

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

:root {
    --primary: #FFD700;
    --primary-light: #FFE44D;
    --primary-dark: #E6C200;
    --secondary: #1a1a1a;
    --secondary-light: #333333;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --dark: #000000;
    --dark-light: #1a1a1a;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f4f4f5;
    --gray-200: #e4e4e7;
    --gray-300: #d4d4d8;
    --gray-400: #a1a1aa;
    --gray-500: #71717a;
    --gray-600: #52525b;
    --gray-700: #333333;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.2), 0 10px 10px -5px rgba(0,0,0,0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.3);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    color: var(--gray-700);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============== SCREENS ============== */
.screen {
    min-height: 100vh;
}

#login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #333333 100%);
    padding: 20px;
}

#dashboard-screen {
    display: flex;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

#dashboard-screen.active {
    display: flex;
}

/* ============== LOGIN & REGISTER ============== */
.login-container {
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.5s ease;
    border: 3px solid var(--primary);
}

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

.login-container h1 {
    text-align: center;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 50%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 4px;
    font-family: 'Georgia', serif;
    text-shadow: none;
    letter-spacing: 1px;
}

.login-container .subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--gray-500);
    transition: all 0.3s ease;
    font-family: inherit;
}

.tab-btn.active {
    background: var(--primary);
    color: var(--secondary);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.tab-btn:hover:not(.active) {
    color: var(--gray-700);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.2);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--secondary);
    box-shadow: 0 4px 14px rgba(255, 215, 0, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-600);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: var(--white);
}

.btn-block {
    width: 100%;
}

.login-container .btn-block {
    margin-top: 8px;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

/* ============== SIDEBAR ============== */
.sidebar {
    width: 280px;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--secondary) 0%, var(--dark) 100%);
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    border-right: 3px solid var(--primary);
}

.nav-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--primary);
}

.nav-header .logo {
    font-size: 2rem;
    font-weight: 800;
    color: #FFD700 !important;
    margin-bottom: 8px;
    font-family: 'Georgia', serif;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.9), 0 0 60px rgba(255, 215, 0, 0.5), 0 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 2px;
}

.nav-header .user-info {
    font-size: 1.1rem;
    color: #FFD700 !important;
    font-weight: 600;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.7), 0 1px 3px rgba(0,0,0,0.5);
}

.header-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-radius: var(--radius);
    color: var(--white) !important;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1.1rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.2) 0%, transparent 100%);
    color: var(--primary) !important;
    border-left: 3px solid var(--primary);
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.3) 0%, transparent 100%);
    color: var(--primary) !important;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    border-left: 3px solid var(--primary);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

.nav-item .icon {
    font-size: 1.5rem;
}

.nav-item.logout {
    margin-top: auto;
    color: #FF6B6B !important;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.nav-item.logout:hover {
    background: rgba(255, 107, 107, 0.2);
    color: #FF6B6B !important;
    border-left: 3px solid #FF6B6B;
}

/* ============== MAIN CONTENT ============== */
main {
    flex: 1;
    padding: 32px 40px;
    margin-left: 280px;
    min-height: 100vh;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

.page.active {
    display: block;
}

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

.page-header h1 {
    color: var(--secondary) !important;
    font-size: 2.2rem;
    font-weight: 800;
    font-family: 'Georgia', serif;
    text-shadow: 2px 2px 0px rgba(255, 215, 0, 0.3);
    letter-spacing: 0.5px;
}

/* ============== CARDS ============== */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* ============== TIMETABLE ============== */
.timetable-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 2px solid var(--gray-200);
}

.timetable-wrapper {
    overflow-x: auto;
}

.timetable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.timetable th,
.timetable td {
    padding: 16px 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

.timetable th {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--dark) 100%);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid var(--primary);
}

.timetable th:first-child {
    border-radius: var(--radius) 0 0 0;
}

.timetable th:last-child {
    border-radius: 0 var(--radius) 0 0;
}

.timetable tbody tr {
    transition: all 0.2s ease;
}

.timetable tbody tr:hover {
    background: rgba(255, 215, 0, 0.05);
}

.timetable td:first-child {
    font-weight: 700;
    color: var(--secondary);
    background: var(--gray-50);
    white-space: nowrap;
    border-left: 3px solid var(--primary);
}

.activity-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.05) 100%);
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 600;
    cursor: move;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.activity-item:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--secondary);
    transform: scale(1.02);
    border-color: var(--primary);
}

.delete-btn {
    opacity: 0;
    color: var(--danger);
    cursor: pointer;
    transition: opacity 0.2s;
}

.activity-item:hover .delete-btn {
    opacity: 1;
}

/* ============== WEEKEND SECTION ============== */
.weekend-section {
    margin-top: 32px;
}

.weekend-section h3 {
    font-size: 1.2rem;
    color: var(--secondary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Georgia', serif;
}

.weekend-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.weekend-card {
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 2px solid var(--gray-200);
    transition: all 0.3s ease;
}

.weekend-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.weekend-card h4 {
    font-size: 1.1rem;
    color: var(--secondary);
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    font-family: 'Georgia', serif;
}

.weekend-card p {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* ============== DAILY PLAN ============== */
.plan-form {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 32px;
    border: 2px solid var(--gray-200);
}

.plan-section {
    margin-bottom: 28px;
}

.plan-section h3 {
    font-size: 1.1rem;
    color: var(--secondary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Georgia', serif;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-group.half {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--gray-100);
}

/* ============== REVIEW ============== */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.review-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    font-weight: 500;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    border-left: 4px solid var(--primary);
}

.review-item:hover {
    box-shadow: var(--shadow);
    transform: translateX(4px);
}

.review-word {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary);
    font-family: 'Georgia', serif;
}

.review-pattern {
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-left: 8px;
}

.review-mastery {
    display: flex;
    gap: 6px;
}

.mastery-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--white);
}

.mastery-dot.filled {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.mastery-dot:hover {
    transform: scale(1.1);
}

/* ============== PROGRESS ============== */
.progress-card {
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 2px solid var(--gray-200);
}

.progress-bar {
    height: 12px;
    background: var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
    margin: 16px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 50%, var(--warning) 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.progress-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.progress-category {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.progress-category h4 {
    color: var(--secondary);
    margin-bottom: 12px;
    font-size: 1rem;
    font-family: 'Georgia', serif;
}

.progress-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.progress-check input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* ============== SETTINGS ============== */
.settings-container {
    max-width: 500px;
}

.settings-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 28px;
    margin-bottom: 24px;
    border: 2px solid var(--gray-200);
}

.settings-card h3 {
    color: var(--secondary);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--gray-100);
    font-family: 'Georgia', serif;
}

/* ============== DATE SELECTOR ============== */
.date-selector {
    display: flex;
    gap: 12px;
}

.date-selector input {
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.95rem;
    background: var(--white);
}

.date-selector input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ============== REVIEW FORM ============== */
.review-form {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
    border: 2px solid var(--gray-200);
}

/* ============== TIMETABLE FORM ============== */
#timetable-form {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
    border: 2px solid var(--gray-200);
}

/* ============== LANGUAGE TOGGLE ============== */
#lang-toggle-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: 2px solid var(--primary);
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    color: var(--secondary) !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

#lang-toggle-btn:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.7);
    transform: scale(1.05);
}

/* ============== RESPONSIVE ============== */
@media (max-width: 1024px) {
    main {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    main {
        margin-left: 0;
        padding: 16px;
        padding-bottom: 80px;
    }
    
    #dashboard-screen {
        padding-bottom: 70px;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .timetable th,
    .timetable td {
        padding: 12px 8px;
        font-size: 0.85rem;
    }
    
    .activity-item {
        font-size: 0.8rem;
        padding: 6px 8px;
    }
    
    .weekend-cards {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .date-selector {
        flex-direction: column;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .login-container {
        padding: 32px 24px;
    }
}

/* Mobile Bottom Navigation */

/* Hide mobile nav on desktop - always hidden unless mobile */
.mobile-nav {
    display: none !important;
}

/* Only show mobile nav on mobile screens */
@media (max-width: 768px) {
    .mobile-nav {
        display: flex !important;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 70px;
        background: rgba(26, 26, 26, 0.95);
        z-index: 1001;
        padding: 0 10px;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    }
    
    .mobile-nav .nav-item {
        flex-direction: column;
        padding: 8px 12px;
        font-size: 0.65rem;
        color: var(--gray-400);
        background: transparent;
        border-radius: var(--radius);
    }
    
    .mobile-nav .nav-item.active {
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        color: var(--secondary);
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    }

    .mobile-nav .nav-item .icon {
        font-size: 1.4rem;
        margin-bottom: 2px;
    }
}

/* ============== ANIMATIONS ============== */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.btn:active {
    transform: scale(0.98);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-200);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
