:root {
    --primary-color: #5865F2;  /* Discord Blurple */
    --background-color: #36393f;  /* Discord Dark Theme Background */
    --available-color: #3ba55d;   /* Discord Green */
    --variable-color: #faa81a;    /* Discord Yellow */
    --grid-color: #2f3136;        /* Discord Darker Background */
    --text-color: #dcddde;        /* Discord Light Text */
    --border-radius: 8px;
}

body {
    font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    letter-spacing: 0.3px;
}

.container {
    max-width: 1600px; 
    margin: 0 auto;
    padding: 30px; 
    background-color: #2f3136;
    border-radius: var(--border-radius);
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    text-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.profile-section {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    background-color: #40444b;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-color);
    margin-right: 30px;
    transition: transform 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.05) rotate(5deg);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    text-align: left;
}

.profile-info h1 {
    margin: 0;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 10px;
}

.profile-details {
    display: flex;
    flex-direction: column;
    color: var(--text-color);
}

.username {
    font-weight: 600;
    color: var(--available-color);
    margin-bottom: 5px;
}

.user-id {
    font-size: 0.9rem;
    color: #7289da;
    opacity: 0.7;
}

h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.timetable {
    display: grid;
    grid-template-columns: 120px 1fr; 
    gap: 2px; 
    background: #40444b;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: hidden;
    border: 1px solid var(--grid-color);
    max-height: 700px; 
    overflow-y: auto;
}

.time-labels {
    display: grid;
    grid-template-rows: 80px repeat(14, 50px); 
    background: var(--primary-color);
    color: white;
    padding: 10px;
}

.time-label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem; 
    font-weight: 500;
    padding: 5px;
    position: sticky;
    left: 0;
    background: var(--primary-color);
    z-index: 15;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: 80px repeat(14, 50px); 
    gap: 2px;
    background: var(--grid-color);
}

.day-header {
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 10px;
    position: sticky;
    top: 0;
    z-index: 20;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem; 
}

.time-slot {
    position: relative;
    background: #40444b;
    border: 1px solid var(--grid-color);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform, box-shadow;
    cursor: not-allowed;
}

.time-slot.available {
    background: var(--available-color);
    opacity: 0.9;
    cursor: pointer;
    animation: pulseGlow 3s infinite;
}

.time-slot.variable {
    background: var(--variable-color);
    opacity: 0.9;
    cursor: help;
    animation: pulseGlow 3s infinite;
}

.time-slot:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    z-index: 10;
}

.time-slot-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(32, 34, 37, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 30;
    font-size: 0.8rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-top: 8px;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.legend {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 30px;
    background: #40444b;
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid var(--grid-color);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

@keyframes pulseGlow {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(0,255,0,0.3);
        opacity: 0.9; 
    }
    50% { 
        box-shadow: 0 0 20px rgba(0,255,0,0.5);
        opacity: 1; 
    }
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
}