/* ==================================
   GLOBAL RESET
================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================================
   DEFAULT THEME (GRADIENT)
================================== */
body {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #4facfe);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: #fff;
    min-height: 100vh;
    text-align: center;
    padding: 20px;
    transition: background 0.5s ease;
}

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

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

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

body.blue {
    background: linear-gradient(-45deg, #2196F3, #1976D2, #64B5F6, #42A5F5);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

body.purple {
    background: linear-gradient(-45deg, #9C27B0, #7B1FA2, #BA68C8, #AB47BC);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

body.dark {
    background: linear-gradient(-45deg, #1a1a1a, #2d2d2d, #3a3a3a, #252525);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* ==================================
   TYPOGRAPHY
================================== */

h1 {
    font-size: 48px;
    margin-top: 30px;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* ==================================
   THEME SELECTOR
================================== */

.theme-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;

    margin: 30px auto;
    padding: 14px 28px;

    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);

    border-radius: 32px;
    width: fit-content;
}

.theme-selector label {
    font-weight: bold;
}

.theme-selector select {
    background: rgba(255, 255, 255, 0.35);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
}

/* ==================================
   AUTO TOGGLE
================================== */

.auto-toggle {
    display: flex;
    align-items: center;
    gap: 8px;

    background: rgba(255, 255, 255, 0.35);
    padding: 6px 12px;
    border-radius: 12px;

    font-size: 14px;
    font-weight: 500;
}

.switch {
    position: relative;
    width: 40px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
}

.slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.switch input:checked+.slider {
    background: #007aff;
}

.switch input:checked+.slider::before {
    transform: translateX(18px);
}

/* ==================================
   DASHBOARD SUMMARY
================================== */

.dashboard-summary {

    margin-top: 45px;
    margin-bottom: 60px;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));

    gap: 20px;

    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.summary-card {

    padding: 20px 22px;

    border-radius: 18px;

    background: rgba(255, 255, 255, 0.18);

    backdrop-filter: blur(10px);

    border: 1px solid rgba(255, 255, 255, 0.35);

    text-align: center;

    transition: transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

.summary-card:hover {

    transform: translateY(-5px);

    background: rgba(255, 255, 255, 0.25);

    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.18);
}

.summary-card h3 {
    font-size: 14px;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    opacity: 0.9;
}

.summary-card p {
    font-size: 24px;
    font-weight: 600;
}

/* Dashboard colors */

.summary-card:nth-child(1) {
    border-top: 3px solid #4f46e5;
}

.summary-card:nth-child(2) {
    border-top: 3px solid #10b981;
}

.summary-card:nth-child(3) {
    border-top: 3px solid #f59e0b;
}

.summary-card:nth-child(4) {
    border-top: 3px solid #ef4444;
}

/* ==================================
   CARD LAYOUT
================================== */

.container {

    margin-top: 30px;

    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));

    gap: 28px;
    padding: 0 10px;
}

.card {
    background-color: white;
    padding: 30px;
    border-radius: 20px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);

    color: #333;
    transition: 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* ==================================
   SMART ATTENDANCE RESULT
================================== */

#attendanceResult {
    font-size: 18px;
    font-weight: 600;
    margin-top: 10px;
}

#attendanceAdvice {
    margin-top: 8px;
    font-size: 15px;
    color: #ef4444;
}

#attendanceFuture {
    margin-top: 6px;
    font-size: 14px;
    color: #2563eb;
}

/* ==================================
   SEMESTER PLANNER CARD
================================== */

.planner #plannerResult {

    margin-top: 12px;

    font-size: 16px;

    font-weight: 600;

    color: #2563eb;
}

/* ==================================
   FORM ELEMENTS
================================== */

input,
select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;

    border: 2px solid #f1efef;
    border-radius: 10px;

    font-size: 15px;
}

input:focus,
select:focus {
    outline: none;
    border-color: #667eea;
}

button {
    width: 100%;
    padding: 12px;
    margin-top: 10px;

    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;

    border: none;
    border-radius: 10px;

    font-size: 15px;
    font-weight: bold;

    cursor: pointer;

    transition: 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.reset {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* ==================================
   MACOS PREMIUM THEME
================================== */

body.mac {
    animation: none;
    background: none;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1d1d1f;
}

body.mac::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("../assets/image.png") no-repeat center center/cover;
    z-index: -2;
}

body.mac::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    z-index: -1;
}

body.mac .card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(25px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
    color: #1d1d1f;
}

/* ==================================
   HEADER LOGO
================================== */

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    font-size: 42px;
    font-weight: 700;
}

.logo svg {

    width: 48px;
    height: 48px;

    stroke: currentColor;
    fill: rgba(210, 210, 210, 0.95);

    stroke-width: 2.2;

    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));

    transition: transform 0.25s ease,
        filter 0.25s ease;
}

.logo:hover svg {
    transform: scale(1.08);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

/* ===============================
   STUDY NOTEPAD
================================= */

.notepad textarea {

    width: 100%;
    resize: none;

    padding: 12px;

    border-radius: 12px;
    border: 2px solid #e5e5e5;

    font-size: 14px;

    margin-top: 10px;

    font-family: inherit;

    transition: border 0.2s ease;
}

.notepad textarea:focus {

    outline: none;

    border-color: #667eea;
}

/* ===============================
   STUDY PROGRESS TRACKER
================================= */

.progress-container {

    width: 100%;
    height: 18px;

    background: rgba(0, 0, 0, 0.1);

    border-radius: 10px;

    overflow: hidden;

    margin-top: 15px;
}

.progress-bar {

    height: 100%;
    width: 0%;

    background: linear-gradient(90deg,
            #6366f1,
            #22c55e);

    border-radius: 10px;

    transition: width 0.6s ease;
}

#progressText {

    margin-top: 10px;

    font-weight: 600;
}

/* ===============================
   DASHBOARD PROGRESS TIMELINE
================================= */

.dashboard-progress {

    width: 100%;
    max-width: 1200px;
    /* SAME width as cards container */

    margin: 50px auto 80px auto;

    display: flex;
    flex-direction: column;
    align-items: center;
}

/* MAIN PROGRESS BAR */

.progress-line {

    position: relative;

    width: 100%;
    /* fills container */
    height: 14px;

    background: rgba(255, 255, 255, 0.25);

    border-radius: 30px;

    overflow: hidden;
}

/* FILLED PROGRESS */

.progress-fill {

    height: 100%;
    width: 0%;

    background: linear-gradient(90deg,
            #22c55e,
            #3b82f6,
            #6366f1);

    border-radius: 30px;

    transition: width 0.9s ease;
}

/* PROGRESS DOT */

.progress-dot {

    position: absolute;

    top: 50%;
    left: 0%;

    transform: translate(-50%, -50%);

    width: 26px;
    height: 26px;

    border-radius: 50%;

    background: white;

    box-shadow:
        0 0 15px rgba(255, 255, 255, 0.9),
        0 0 35px rgba(59, 130, 246, 0.9);

    transition: left 0.9s ease;
}

/* DOT PULSE */

.progress-dot::after {

    content: "";

    position: absolute;

    inset: -10px;

    border-radius: 50%;

    border: 2px solid rgba(255, 255, 255, 0.6);

    animation: progressPulse 2s infinite;
}

@keyframes progressPulse {

    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }

}

/* LABEL */

.progress-label {

    margin-top: 20px;

    font-size: 22px;
    font-weight: 600;

}

/* ===============================
   DIGITAL TIMER DISPLAY
================================= */

.timer-display {

    display: flex;
    justify-content: center;
    align-items: center;

    gap: 6px;

    font-family: "Courier New", monospace;
    font-size: 36px;
    font-weight: 700;

    margin-top: 20px;

    background: #f5f5f5;

    padding: 14px 18px;

    border-radius: 12px;

    box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.1);

}

/* ===============================
   TIMER GLOW EFFECT
================================= */

.timer-display span {

    transition: all 0.2s ease;

}

/* glow when timer running */

.timer-running span {

    color: #3b82f6;

    text-shadow:
        0 0 8px rgba(59, 130, 246, 0.6),
        0 0 18px rgba(59, 130, 246, 0.6),
        0 0 28px rgba(59, 130, 246, 0.6);

}

/* blinking colon */

.timer-colon {
    animation: timerBlink 1s infinite;
}

@keyframes timerBlink {

    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }

}
