/* =========================================
   GOOGLE FONT
========================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');


/* =========================================
   ROOT VARIABLES
========================================= */

:root {
    --primary-color: #6c63ff;
    --secondary-color: #f4f3ff;
    --background-color: #f5f6fa;
    --card-color: #ffffff;
    --text-color: #222222;
    --muted-color: #777777;
    --border-color: #eeeeee;
    --hover-color: #e9e7ff;

    --shadow:
        0 10px 30px rgba(0, 0, 0, 0.08);
}


/* =========================================
   DARK THEME
========================================= */

body.dark-mode {
    --background-color: #181818;
    --card-color: #242424;
    --text-color: #ffffff;
    --muted-color: #b5b5b5;
    --secondary-color: #333333;
    --border-color: #3a3a3a;
    --hover-color: #3b3b3b;

    --shadow:
        0 10px 30px rgba(0, 0, 0, 0.25);
}


/* =========================================
   GLOBAL RESET
========================================= */

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


/* =========================================
   BODY
========================================= */

body {
    font-family: 'Poppins', sans-serif;

    background: var(--background-color);
    color: var(--text-color);

    min-height: 100vh;

    transition:
        background-color 0.3s ease,
        color 0.3s ease;
}


/* =========================================
   MAIN CONTAINER
========================================= */

.container {
    width: 90%;
    max-width: 1000px;

    margin: 0 auto;

    padding: 40px 0;
}


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

.header {
    text-align: center;

    margin-bottom: 35px;
}

.header h1 {
    font-size: 32px;

    font-weight: 600;

    margin-bottom: 8px;
}

.header p {
    color: var(--muted-color);

    font-size: 15px;
}


/* =========================================
   CONTROL BUTTONS
========================================= */

.controls {
    display: flex;

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

    gap: 10px;

    margin-top: 20px;

    flex-wrap: wrap;
}


.control-btn {
    padding: 9px 18px;

    border: none;

    border-radius: 20px;

    background: var(--secondary-color);

    color: var(--text-color);

    font-family: inherit;

    font-size: 13px;

    cursor: pointer;

    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        transform 0.3s ease;
}


.control-btn:hover {
    background: var(--primary-color);

    color: #ffffff;

    transform: translateY(-2px);
}


/* =========================================
   CLOCK SECTION
========================================= */

.clock-section {
    display: flex;

    justify-content: center;

    margin-bottom: 35px;
}


/* =========================================
   CLOCK CARD
========================================= */

.clock-card {
    width: 100%;

    max-width: 650px;

    background: var(--card-color);

    padding: 35px 25px;

    border-radius: 20px;

    box-shadow: var(--shadow);

    text-align: center;

    transition:
        background-color 0.3s ease,
        box-shadow 0.3s ease;
}


/* =========================================
   DAY
========================================= */

.day {
    font-size: 20px;

    font-weight: 500;

    color: var(--primary-color);

    margin-bottom: 5px;
}


/* =========================================
   DATE
========================================= */

.date {
    font-size: 15px;

    color: var(--muted-color);

    margin-bottom: 20px;
}


/* =========================================
   TIME
========================================= */

.time {
    font-size: 55px;

    font-weight: 600;

    letter-spacing: 2px;
}


/* =========================================
   CALENDAR SECTION
========================================= */

.calendar-section {
    display: flex;

    justify-content: center;
}


/* =========================================
   CALENDAR CARD
========================================= */

.calendar-card {
    width: 100%;

    max-width: 650px;

    background: var(--card-color);

    padding: 30px;

    border-radius: 20px;

    box-shadow: var(--shadow);

    transition:
        background-color 0.3s ease,
        box-shadow 0.3s ease;
}


/* =========================================
   CALENDAR HEADER
========================================= */

.calendar-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 20px;
}


.calendar-header h2 {
    font-size: 22px;

    font-weight: 600;
}


/* =========================================
   NAVIGATION BUTTONS
========================================= */

.nav-btn {
    width: 40px;
    height: 40px;

    border: none;

    border-radius: 50%;

    background: var(--secondary-color);

    color: var(--primary-color);

    font-size: 18px;

    cursor: pointer;

    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        transform 0.3s ease;
}


.nav-btn:hover {
    background: var(--primary-color);

    color: #ffffff;

    transform: scale(1.05);
}


/* =========================================
   TODAY BUTTON
========================================= */

.today-btn {
    display: block;

    margin: 0 auto 25px;

    padding: 8px 20px;

    border: none;

    border-radius: 20px;

    background: var(--primary-color);

    color: #ffffff;

    font-family: inherit;

    font-size: 13px;

    cursor: pointer;

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}


.today-btn:hover {
    transform: translateY(-2px);

    opacity: 0.9;
}


/* =========================================
   WEEKDAYS
========================================= */

.weekdays {
    display: grid;

    grid-template-columns:
        repeat(7, 1fr);

    text-align: center;

    margin-bottom: 10px;
}


.weekdays div {
    font-size: 13px;

    font-weight: 600;

    color: var(--muted-color);

    padding: 10px 0;
}


/* =========================================
   CALENDAR DAYS
========================================= */

.calendar-days {
    display: grid;

    grid-template-columns:
        repeat(7, 1fr);

    gap: 8px;
}


.calendar-days div {
    height: 45px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 10px;

    font-size: 14px;

    cursor: pointer;

    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        transform 0.3s ease;
}


/* =========================================
   DATE HOVER
========================================= */

.calendar-days div:hover {
    background: var(--hover-color);

    color: var(--primary-color);

    transform: translateY(-2px);
}


/* =========================================
   TODAY DATE
========================================= */

.calendar-days .today {
    background: var(--primary-color);

    color: #ffffff;

    font-weight: 600;
}


/* =========================================
   SELECTED DATE
========================================= */

.calendar-days .selected {
    border: 2px solid var(--primary-color);
}


/* =========================================
   SELECTED DATE SECTION
========================================= */

.selected-date-section {
    text-align: center;

    margin-top: 25px;
}


.selected-date-section p {
    color: var(--muted-color);

    font-size: 14px;
}


/* =========================================
   WORLD CLOCK SECTION
========================================= */

.world-clock-section {
    display: flex;

    justify-content: center;

    margin-top: 35px;
}


/* =========================================
   WORLD CLOCK CARD
========================================= */

.world-clock-card {
    width: 100%;

    max-width: 650px;

    background: var(--card-color);

    padding: 30px;

    border-radius: 20px;

    box-shadow: var(--shadow);

    transition:
        background-color 0.3s ease,
        box-shadow 0.3s ease;
}


.world-clock-card h2 {
    text-align: center;

    font-size: 22px;

    font-weight: 600;

    margin-bottom: 25px;
}


/* =========================================
   WORLD CLOCK GRID
========================================= */

.world-clocks {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 15px;
}


/* =========================================
   TIMEZONE CARD
========================================= */

.timezone-card {
    padding: 20px;

    border-radius: 15px;

    background: var(--secondary-color);

    text-align: center;

    transition:
        background-color 0.3s ease,
        transform 0.3s ease;
}


.timezone-card:hover {
    transform: translateY(-3px);
}


.timezone-card h3 {
    font-size: 15px;

    font-weight: 500;

    margin-bottom: 8px;
}


.timezone-card p {
    font-size: 22px;

    font-weight: 600;

    color: var(--primary-color);
}


/* =========================================
   PAGE LOAD ANIMATION
========================================= */

.header,
.clock-card,
.calendar-card,
.selected-date-section,
.world-clock-card {
    animation: fadeUp 0.7s ease both;
}


.clock-card {
    animation-delay: 0.1s;
}


.calendar-card {
    animation-delay: 0.2s;
}


.selected-date-section {
    animation-delay: 0.3s;
}


.world-clock-card {
    animation-delay: 0.4s;
}


/* =========================================
   FADE UP ANIMATION
========================================= */

@keyframes fadeUp {

    from {
        opacity: 0;

        transform:
            translateY(20px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}


/* =========================================
   FOOTER
========================================= */

.footer {
    text-align: center;

    padding: 30px 15px;

    margin-top: 45px;

    border-top:
        1px solid var(--border-color);

    color: var(--muted-color);

    font-size: 13px;

    transition:
        color 0.3s ease,
        border-color 0.3s ease;
}


.footer p:first-child {
    margin-bottom: 5px;

    font-weight: 500;
}


/* =========================================
   TABLET RESPONSIVE
========================================= */

@media (max-width: 900px) {

    .container {
        width: 92%;
    }


    .clock-card,
    .calendar-card,
    .world-clock-card {
        max-width: 600px;
    }


    .time {
        font-size: 48px;
    }


    .calendar-card,
    .world-clock-card {
        padding: 25px;
    }
}


/* =========================================
   MOBILE RESPONSIVE
========================================= */

@media (max-width: 600px) {

    .container {
        width: 94%;

        padding: 25px 0;
    }


    /* Header */

    .header {
        margin-bottom: 25px;
    }


    .header h1 {
        font-size: 24px;
    }


    .header p {
        font-size: 13px;
    }


    /* Controls */

    .controls {
        gap: 8px;
    }


    .control-btn {
        padding: 8px 14px;

        font-size: 12px;
    }


    /* Clock */

    .clock-card {
        padding: 28px 15px;

        border-radius: 16px;
    }


    .day {
        font-size: 17px;
    }


    .date {
        font-size: 13px;
    }


    .time {
        font-size: 34px;

        letter-spacing: 1px;
    }


    /* Calendar */

    .calendar-card {
        padding: 20px 12px;

        border-radius: 16px;
    }


    .calendar-header {
        margin-bottom: 15px;
    }


    .calendar-header h2 {
        font-size: 18px;
    }


    /* Navigation */

    .nav-btn {
        width: 35px;

        height: 35px;

        font-size: 15px;
    }


    /* Today */

    .today-btn {
        font-size: 12px;

        padding: 7px 16px;

        margin-bottom: 18px;
    }


    /* Weekdays */

    .weekdays div {
        font-size: 11px;

        padding: 8px 0;
    }


    /* Calendar Dates */

    .calendar-days {
        gap: 4px;
    }


    .calendar-days div {
        height: 38px;

        font-size: 12px;

        border-radius: 8px;
    }


    /* Selected Date */

    .selected-date-section {
        margin-top: 20px;
    }


    .selected-date-section p {
        font-size: 12px;
    }


    /* World Clocks */

    .world-clock-card {
        padding: 20px 12px;

        border-radius: 16px;
    }


    .world-clock-card h2 {
        font-size: 19px;

        margin-bottom: 18px;
    }


    .world-clocks {
        grid-template-columns: 1fr;

        gap: 10px;
    }


    .timezone-card {
        padding: 15px;
    }


    .timezone-card h3 {
        font-size: 14px;
    }


    .timezone-card p {
        font-size: 19px;
    }


    /* Footer */

    .footer {
        margin-top: 30px;

        padding: 25px 10px;

        font-size: 11px;
    }
}


/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 400px) {

    .header h1 {
        font-size: 21px;
    }


    .time {
        font-size: 29px;
    }


    .calendar-card {
        padding: 18px 8px;
    }


    .calendar-days {
        gap: 2px;
    }


    .calendar-days div {
        height: 35px;

        font-size: 11px;
    }


    .weekdays div {
        font-size: 10px;
    }


    .nav-btn {
        width: 32px;

        height: 32px;
    }


    .calendar-header h2 {
        font-size: 16px;
    }


    .control-btn {
        font-size: 11px;

        padding: 7px 11px;
    }
}