:root {
    /* BIS Theme Colors - matching the GPA Calculator */
    --bis-primary: #1e3a5f;
    --bis-secondary: #2c5282;
    --bis-accent: #4a9eff;
    --bis-light: #63b3ed;
    --bis-dark: #0f2744;
    --bis-gradient-start: #1a365d;
    --bis-gradient-end: #2563eb;
    
    /* UI Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #1a202c;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Subject Colors */
    --subject-1: #ef4444;
    --subject-2: #f59e0b;
    --subject-3: #10b981;
    --subject-4: #3b82f6;
    --subject-5: #8b5cf6;
    --subject-6: #ec4899;
    --subject-7: #14b8a6;
    --subject-8: #f97316;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--bis-gradient-start) 0%, var(--bis-gradient-end) 100%);
    min-height: 100vh;
    padding: 2rem 1rem 4rem 1rem;
    color: var(--text-primary);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(74, 158, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(99, 179, 237, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeInDown 0.6s ease-out;
}

.logo-container {
    margin-bottom: 1.5rem;
    animation: logoFloat 3s ease-in-out infinite;
}

.logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.header h1 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
}

.header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
}

.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 0.875rem 1.75rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--bis-primary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: white;
}

.main-card {
    background: var(--bg-card);
    border-radius: 28px;
    box-shadow: var(--shadow-2xl);
    padding: 2.5rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.selection-section {
    margin-bottom: 2rem;
}

.selection-title {
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--bis-primary);
}

.year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.year-card {
    background: linear-gradient(135deg, var(--bis-primary) 0%, var(--bis-secondary) 100%);
    border: none;
    border-radius: 20px;
    padding: 2rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    color: white;
    text-align: center;
}

.year-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.year-card.active {
    background: linear-gradient(135deg, var(--bis-accent) 0%, var(--bis-light) 100%);
    box-shadow: 0 0 0 4px rgba(74, 158, 255, 0.3);
}

.year-number {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.5rem;
}

.year-label {
    font-size: 1rem;
    font-weight: 600;
}

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

.subjects-header h3 {
    font-size: 1.4rem;
    color: var(--bis-primary);
    font-weight: 700;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.subject-card {
    background: var(--bg-main);
    border-radius: 16px;
    padding: 1.5rem;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

.subject-card:hover {
    border-color: var(--bis-accent);
    box-shadow: var(--shadow-md);
}

.subject-card.subject-locked {
    background: #f3f4f6;
    opacity: 0.6;
    pointer-events: none;
    border-color: #9ca3af;
}

.locked-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.subject-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.subject-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.subject-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    flex: 1;
}

.doctor-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.doctor-item {
    background: white;
    border-radius: 10px;
    padding: 0.75rem;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.doctor-item:hover {
    border-color: var(--bis-accent);
    box-shadow: var(--shadow-sm);
}

.doctor-item.selected {
    background: linear-gradient(135deg, var(--bis-accent) 0%, var(--bis-light) 100%);
    color: white;
    border-color: var(--bis-accent);
}

.doctor-item.disabled {
    background: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.5;
    pointer-events: none;
}

.doctor-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.doctor-schedule {
    font-size: 0.85rem;
    opacity: 0.8;
}

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

.schedule-header h3 {
    font-size: 1.4rem;
    color: var(--bis-primary);
    font-weight: 700;
}

.schedule-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary {
    background: linear-gradient(135deg, var(--bis-dark) 0%, var(--bis-primary) 100%);
    color: white;
}

.schedule-table-wrapper {
    overflow-x: auto;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 16px;
    overflow: hidden;
}

.schedule-table thead {
    background: linear-gradient(135deg, var(--bis-primary) 0%, var(--bis-secondary) 100%);
    color: white;
}

.schedule-table th {
    padding: 1.25rem 1rem;
    font-weight: 700;
    text-align: center;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.schedule-table .time-column {
    min-width: 140px;
    background: rgba(0, 0, 0, 0.1);
}

.schedule-table .day-column {
    min-width: 120px;
    background: rgba(0, 0, 0, 0.1);
    font-weight: 700;
    color: var(--bis-primary);
    text-align: left;
    padding-left: 1.5rem;
}

.schedule-table td {
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border);
    min-height: 80px;
    vertical-align: middle;
    cursor: pointer;
    transition: all 0.3s ease;
}

.schedule-table td:hover {
    background: rgba(74, 158, 255, 0.05);
}

.schedule-table tbody tr:hover {
    background: var(--bg-main);
}

.schedule-cell {
    position: relative;
}

.preview-highlight {
    background: rgba(74, 158, 255, 0.1) !important;
    border: 2px solid var(--bis-accent) !important;
    animation: pulse-border 1.5s infinite;
}

@keyframes pulse-border {
    0%, 100% {
        border-color: var(--bis-accent);
    }
    50% {
        border-color: var(--bis-light);
    }
}

.drag-target-highlight {
    position: relative;
    animation: pulse-gentle 1.5s ease-in-out infinite;
}

@keyframes pulse-gentle {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.time-slot {
    font-weight: 600;
    color: var(--bis-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.slot-content {
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
}

.slot-preview {
    cursor: pointer;
    border: 2px dashed white;
}

.slot-preview:hover {
    opacity: 0.8 !important;
    transform: scale(1.05);
}

.slot-confirmed {
    box-shadow: var(--shadow-md);
}

.slot-confirmed:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.slot-subject {
    font-weight: 700;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.slot-doctor {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-bottom: 0.15rem;
}

.slot-group {
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.95;
    margin-top: 0.15rem;
    padding: 0.15rem 0.4rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    display: inline-block;
}

.slot-hint {
    font-size: 0.65rem;
    margin-top: 0.25rem;
    opacity: 0.85;
    font-style: italic;
}

.slot-delete-hint {
    font-size: 0.6rem;
    margin-top: 0.3rem;
    opacity: 0.7;
    font-style: italic;
    display: none;
}

.slot-confirmed:hover .slot-delete-hint {
    display: block;
}

.slot-empty {
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.5;
    font-size: 0.8rem;
}

.footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem 1rem;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--bis-accent), transparent);
    margin: 1.5rem auto;
    border-radius: 2px;
}

.footer-text {
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-icon {
    width: 20px;
    height: 20px;
}

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

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

@media (max-width: 768px) {
    body {
        padding: 1rem 0.5rem 3rem 0.5rem;
    }

    .logo {
        width: 80px;
        height: 80px;
    }

    .header h1 {
        font-size: 1.75rem;
    }

    .main-card {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .year-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .year-card {
        padding: 1.5rem 1rem;
    }

    .year-number {
        font-size: 2.5rem;
    }

    .subjects-grid {
        grid-template-columns: 1fr;
    }

    .schedule-table {
        font-size: 0.8rem;
    }

    .schedule-table th,
    .schedule-table td {
        padding: 0.5rem 0.25rem;
    }

    .slot-content {
        padding: 0.5rem;
        font-size: 0.75rem;
        min-height: 50px;
    }

    .schedule-actions {
        width: 100%;
    }

    .schedule-actions .btn {
        flex: 1;
        justify-content: center;
    }

    .footer-social {
        flex-direction: column;
        gap: 0.75rem;
    }

    .social-link {
        justify-content: center;
    }
}
