

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #080b1a;
    --bg-secondary: #0e1328;
    --card: rgba(255, 255, 255, 0.055);
    --card-hover: rgba(255, 255, 255, 0.085);
    --border: rgba(255, 255, 255, 0.10);

    --primary: #7c5cff;
    --secondary: #22d3ee;

    --text: #f5f7ff;
    --muted: #9aa3b8;

    --danger: #ff5c7a;

    --radius: 20px;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--text);

    background:
        radial-gradient(
            circle at 15% 5%,
            rgba(124, 92, 255, 0.20),
            transparent 32%
        ),
        radial-gradient(
            circle at 85% 25%,
            rgba(34, 211, 238, 0.10),
            transparent 30%
        ),
        var(--bg);

    overflow-x: hidden;
 
}


/* ================================
   BACKGROUND STARS
================================ */

body::after {
    content: "";

    position: fixed;
    inset: 0;

    pointer-events: none;

    opacity: 0.35;

    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.633) 0.5px, transparent 0.5px ),
        radial-gradient(circle, rgba(255, 255, 255, 0.66) 0.5px, transparent 0.5px);

    background-size:
        120px 120px,
        180px 180px;

    background-position:
        20px 30px,
        80px 90px;


}


/* ================================
   HEADER
================================ */

header {
    width: min(1100px, 92%);

    margin: 0 auto;

    padding: 60px 20px 50px;

    text-align: center;
}

header h1 {
    font-size: clamp(2.7rem, 7vw, 5rem);

    line-height: 1.5;

    font-weight: 850;

    letter-spacing: -3px;

    background:
        linear-gradient(
        100deg,
            #ffffff,
            #b9a9ff,
            #72e7ff
        );

    -webkit-background-clip: text;
    background-clip: text ;

    color:  transparent;

    margin-bottom: 18px;
}

header p:not(#todaydate) {
    color: var(--muted);

    font-size: 1.1rem;

    letter-spacing: 0.5px;
}

#todaydate {
    display: inline-block;

    margin-top: 25px;

    padding: 8px 16px;

    border: 1px solid var(--border);

    border-radius: 100px;

    color: #cbd3e7;

    background: rgba(255, 255, 255, 0.04);

    font-size: 0.85rem;
}


/* ================================
   MAIN
================================ */

main {
    width: min(1050px, 92%);

    margin: auto;

    padding-bottom: 100px;
}


/* ================================
   GENERAL SECTIONS
================================ */

section {
    margin-bottom: 28px;
}

section h2 {
    font-size: 1.5rem;

    margin-bottom: 20px;

    letter-spacing: -0.5px;
}


/* ================================
   BIRTH INPUT SECTION
================================ */

.main {
  
    position: relative;

    padding: 38px;

    border-radius: var(--radius);

    border: 1px solid var(--border);

    background:
        linear-gradient(
            135deg,
            rgba(124, 92, 255, 0.10),
            rgba(255, 255, 255, 0.035)
        );

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.25);

    overflow: hidden;
      backdrop-filter: blur(10px);
    
}

.main::before {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    top: -100px;
    right: -70px;

    border-radius: 50%;

    background: var(--primary);

    filter: blur(70px);

    opacity: 0.25;

    pointer-events: none;
}

.main h2 {
    text-align: center;

    font-size: 1.7rem;
}


/* ================================
   INPUTS
================================ */

.calc-age {
    max-width: 700px;

    margin: auto;
}

.input {
    display: grid;

    grid-template-columns:1fr 1.4fr 1fr;

    gap: 12px;

    margin-bottom: 20px;
}

.input input,
.input select {
    width: 100%;

    padding: 15px 16px;

    border-radius: 12px;

    border: 1px solid var(--border);

    outline: none;

    background: rgba(0, 0, 0, 0.25);

    color: var(--text);

    font-size: 1rem;

    transition: 0.25s ease;
}

.input input::placeholder {
    color: #69738b;
}

.input select {
    cursor: pointer;
    
}

.input select option {
    background: #10152b;
    color: white;
}
.input select [disabled]{
    background-color: #0328ff;
}

.input input:focus,
.input select:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(124, 92, 255, 0.12),
        0 0 25px rgba(124, 92, 255, 0.12);
}


/* ================================
   BUTTON
================================ */

.calculate {
    text-align: center;
}

#calc-button {
    border: none;

    outline: none;

    padding: 14px 30px;

    border-radius: 12px;

    cursor: pointer;

    color: white;

    font-size: 1rem;

    font-weight: 700;

    background:
        linear-gradient(
            100deg,
            var(--primary),
            #5f8cff
        );

    box-shadow:
        0 8px 25px rgba(124, 92, 255, 0.25);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

#calc-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 12px 35px rgba(124, 92, 255, 0.38);
}

#calc-button:active {
    transform: translateY(0);
}


/* ================================
   ERROR
================================ */

.error {
    margin: 12px 0 15px;

    text-align: center;

    color: var(--danger);

    font-size: 1rem;
}


/* ================================
   AGE RESULT
================================ */

.result {
    padding: 45px 30px;

    text-align: center;

    border-radius: var(--radius);

    border: 1px solid rgba(124, 92, 255, 0.18);

    background:
        radial-gradient(
            circle at center,
            rgba(124, 92, 255, 0.12),
            transparent 65%
        ),
        var(--card);

    backdrop-filter: blur(18px);
}

.result h2 {
    color: var(--muted);

    font-size: 0.9rem;

    text-transform: uppercase;

    letter-spacing: 1px;
}

.output {
    font-size: clamp(1.2rem, 4vw, 1.8rem);

    color: #dce1f2;

    line-height: 1.5;
}

.year-output {
    font-size: clamp(4rem, 12vw, 7rem);

    font-weight: 850;

    line-height: 0.9;

    letter-spacing: -5px;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #a994ff,
            #64e5ff
        );

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;
}

#age-section {
    display: inline-block;

    margin-top: 22px;

    padding: 8px 15px;

    border-radius: 100px;

    background: rgba(124, 92, 255, 0.10);

    border: 1px solid rgba(124, 92, 255, 0.18);

    color: #c7bcff;

    font-size: 0.9rem;
}


/* ================================
   ADDITIONAL INFO
================================ */

.add-info {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 15px;

    background: transparent;
}

.add-info > h2 {
    grid-column: 1 /4;

    margin-bottom: 3px;
}


/* Individual info cards */

.birth-day,
.zodiac,
.gen,
.next,
.total-days,
.total-weeks,
.total-hours {

    min-height: 145px;

    padding: 24px;

    border-radius: 17px;

    border: 1px solid var(--border);

    background: var(--card);

    backdrop-filter: blur(15px);

    transition:
        transform 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease;
}

.birth-day:hover,
.zodiac:hover,
.gen:hover,
.next:hover,
.total-days:hover,
.total-weeks:hover,
.total-hours:hover {

    transform: translateY(-5px);

    background: var(--card-hover);

    border-color:
        rgba(124, 92, 255, 0.30);
}


/* Card headings */

.birth-day h3,
.zodiac h3,
.gen h3,
.next h3,
.total-days h3,
.total-weeks h3,
.total-hours h3 {

    color: var(--muted);

    font-size: 0.75rem;

    text-transform: uppercase;

    letter-spacing: 1.5px;

    margin-bottom: 18px;
}


/* Card values */

.birth-day p,
.zodiac p,
.gen p,
.next p,
.total-days p,
.total-weeks p,
.total-hours p {

    color: var(--text);

    font-size: 1.25rem;

    font-weight: 700;

    line-height: 1.4;
}


/* Zodiac */

.zodiac p {
    font-size: 1.6rem;

    color: #c7bcff;
}


/* ================================
   HISTORY
================================ */

.hist {
    position: relative;

    padding: 35px;

    border-radius: var(--radius);

    border: 1px solid var(--border);

    background:
        linear-gradient(
            145deg,
            rgba(34, 211, 238, 0.055),
            rgba(124, 92, 255, 0.06)
        );

    backdrop-filter: blur(18px);
}

.hist > h2 {
    text-align: center;

    margin-bottom: 28px;
}


/* History cards */

.islamicdate,
.histo,
.histo-birth {

    padding: 22px;

    margin-bottom: 14px;

    border-radius: 15px;

    border: 1px solid rgba(255, 255, 255, 0.07);

    background: rgba(0, 0, 0, 0.15);
}

.islamicdate h3,
.histo h3,
.histo-birth h3 {

    margin-bottom: 8px;

    color: #aeb7ce;

    font-size: 0.75rem;

    text-transform: uppercase;

    letter-spacing: 1.5px;
}

.islamicdate p,
.histo p,
.histo-birth p {

    color: #eef1fa;

    line-height: 1.7;

    font-size: 0.98rem;
}

.islamicdate p {
    color: #c7bcff;

    font-weight: 700;

    font-size: 1.15rem;
}


/* ================================
   FIREWORKS
================================ */

#fireworks {

    position: fixed;

    inset: 0;

    overflow: hidden;

    pointer-events: none;

    z-index: 9999;

    opacity: 0;

    visibility: hidden;

    transition:
        opacity 1s ease,
        visibility 1s ease;
}

#fireworks.show-fireworks {
    opacity: 1;

    visibility: visible;
}

#fireworks.hide-fireworks {
    opacity: 0;

    visibility: hidden;
}


/* Bottom darkness */

#fireworks::after {

    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 20%;

    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, 0.9),
            rgba(0, 0, 0, 0.55),
            transparent
        );

    pointer-events: none;
}


/* Rocket */

.rocket {

    position: absolute;

    width: 5px;

    height: 18px;

    border-radius: 50%;

    background: #00eaff;

    box-shadow:
        0 0 6px #00eaff,
        0 0 14px #00eaff,
        0 0 25px #00eaff;

    transition:
        top 1.2s cubic-bezier(.2, .8, .3, 1);
}


/* Rocket trail */

.rocket::after {

    content: "";

    position: absolute;

    left: 1px;

    top: 14px;

    width: 3px;

    height: 35px;

    background:
        linear-gradient(
            to bottom,
            #00eaff,
            #7c4dff,
            transparent
        );

    filter: blur(1px);
}


/* Explosion */

.particle {

    position: absolute;

    width: 6px;

    height: 6px;

    border-radius: 50%;

    opacity: 1;

    transition:
        transform 1.4s cubic-bezier(.15, .8, .3, 1),
        opacity 1.4s ease;
}


/* ================================
   RESPONSIVE
================================ */

@media (max-width: 750px) {
 
    header {
        padding-top: 65px;

        padding-bottom: 35px;
    }

    header h1 {
        letter-spacing: -2px;
    }

    .main {
        padding: 25px 20px;
    }

    .input {
        grid-template-columns: 1fr;

        gap: 10px;
    }

    .add-info {
        grid-template-columns: repeat(2, 1fr);
    }

    .add-info > h2 {
        grid-column: 1 / -1;
    }

    .hist {
        padding: 20px 18px;
    }
}


@media (max-width: 480px) {

   
    main {
        width: 94%;
    }

    header {
        padding-top: 50px;
    }

    header h1 {
        font-size: 2.7rem;

        letter-spacing: -2px;
    }

    header p:not(#todaydate) {
        font-size: 0.95rem;
    }

    .result {
        padding: 35px 15px;
    }

    .year-output {
        font-size: 4.5rem;
    }

    .add-info {
        grid-template-columns: 1fr;
    }

    .add-info > h2 {
        grid-column: auto;
    }

    .birth-day,
    .zodiac,
    .gen,
    .next,
    .total-days,
    .total-weeks,
    .total-hours {
        min-height: 120px;
    }

    .hist {
        padding: 22px 15px;
    } 
}