/* =======================================================
   COMBINED STYLESHEET
   1. Portfolio / Main Site  (originally styles.css)
   2. Age Calculator Page    (originally styless.css)
   ======================================================= */


/* -------------------------------------------------------
   SECTION 1 – PORTFOLIO / MAIN SITE  (styles.css)
   ------------------------------------------------------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
}

:root {
    --bg-color: #fff;
    --snd-bg-color: #f9f9f0;
    --text-color: #333;
    --main-color: #0ef;
    --header-bg: var(--main-color);
    --card-shadow: rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
    /* Age calculator header gradient */
    --age-header-start: #2c3e50;
    --age-header-end: #4a6491;
    /* Age calculator text colours */
    --age-label-color: #2c3e50;
    --age-zodiac-name: #2c3e50;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-color: #0d1117;
    --snd-bg-color: #161b22;
    --text-color: #c9d1d9;
    --main-color: #0ef;
    --card-shadow: rgba(0, 0, 0, 0.4);
    /* Age calculator header — softer in dark mode */
    --age-header-start: #1a1f35;
    --age-header-end: #2a3a5c;
    --age-label-color: #c9d1d9;
    --age-zodiac-name: #c9d1d9;
}

html {
    font-size: 62.5%;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

section {
    min-height: 100vh;
    padding: 18rem 9% 7rem;
}

.heading span,
.about-content h3 span {
    color: #0ef;
}

.header {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    padding: 20px 10%;
    background: var(--main-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    position: relative;
    font-size: 30px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    cursor: default;
    opacity: 0;
    left: 0%;
    animation: slideRight 5s ease forwards;
}

.logo:hover {
    transform: scale(1.05);
    color: green;
}

.navbar a {
    display: inline-block;
    font-size: 25px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    margin-left: 35px;
    transition: .3s;
    opacity: 0;
    animation: slideTop .5s ease forwards;
    animation-delay: calc(.2s * var(--i));
}

.navbar a:hover,
.navbar a.active {
    color: crimson;
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--bg-color);
    cursor: pointer;
    display: none;
}

.home {
    position: relative;
    width: 100%;
    justify-content: flex-start;
    height: 100vh;
    background-color: var(--bg-color);
    background-size: cover;
    display: flex;
    align-items: center;
    padding-left: 10%;
    flex-direction: row;
    gap: 10%;
    padding-top: 70px;
    padding-bottom: 70px;
}

.home-img {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
}

.home-img img {
    margin-top: 0;
    width: 25vw;
    border-radius: 50%;
    box-shadow: 0 0 25px var(--main-color);
    cursor: pointer;
    animation: floatImage 5s ease-in-out infinite;
}

.home-img img:hover {
    box-shadow: 0 0 25px var(--main-color),
        0 0 35px var(--main-color),
        0 0 45px var(--main-color);
}

@keyframes floatImage {
    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(20);
    }

    25% {
        transform: translateX(20px);
    }

    75% {
        transform: translateX(-20px);
    }
}

.home-content {
    margin-left: 0;
    flex: 1;
}

.home-content h3 {
    font-size: 32px;
    font-weight: 700;
    opacity: 0;
    animation: slideBottom 1s ease forwards;
    animation-delay: .7s;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.home-content h3:nth-of-type(2) {
    animation: slideTop 1s ease forwards;
    animation-delay: .7s;
}

.home-content h3 span {
    color: #0ef;
}

.home-content h1 {
    font-size: 56px;
    font-weight: 700;
    margin: -3px 0;
    opacity: 0;
    animation: slideRight 1s ease forwards;
    animation-delay: 1s;
    position: relative;
    color: var(--text-color);
    overflow: hidden;
    transition: color 0.3s ease;
}

.home-content h1::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    color: var(--main-color);
    overflow: hidden;
    white-space: nowrap;
    transition: width 500ms ease;
}

.home-content h1:hover::before {
    width: 100%;
}

.home-content p {
    font-size: 20px;
    opacity: 0;
    animation: slideLeft 1s ease forwards;
    animation-delay: 1s;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.home-sci a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid #0ef;
    border-radius: 50%;
    font-size: 20px;
    color: #0ef;
    text-decoration: none;
    margin: 30px 15px 30px 0;
    transition: .5s ease;
    opacity: 0;
    animation: slideLeft 1s ease forwards;
    animation-delay: calc(.2s * var(--i));
}

.home-sci a:hover {
    background: #0ef;
    color: #081b29;
    box-shadow: 0 0 20px #0ef;
}

.btn-box {
    display: inline-block;
    padding: 12px 28px;
    background: #0ef;
    border-radius: 40px;
    font-size: 16px;
    color: #081b29;
    letter-spacing: 1px;
    text-decoration: none;
    font-weight: 600;
    opacity: 0;
    animation: slideTop 1s ease forwards;
    animation-delay: 2s;
    box-shadow: 0 0 5px #0ef, 0 0 25px #0ef;
    margin-right: 20px;
}

.btn-box:hover {
    box-shadow: 0 0 5px cyan, 0 0 25px cyan, 0 0 50px cyan,
        0 0 100px cyan, 0 0 200px cyan;
}

@keyframes slideRight {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideLeft {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideTop {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideBottom {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* About */
.about {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background: var(--snd-bg-color);
}

.about-img img {
    width: 25vw;
    border: 2px solid var(--main-color);
    border-radius: 50%;
    box-shadow: 0 0 25px var(--main-color);
    cursor: pointer;
    transition: 0.4s ease;
}

.about-img img:hover {
    box-shadow: 0 0 25px var(--main-color),
        0 0 35px var(--main-color),
        0 0 45px var(--main-color);
}

.heading {
    font-size: 6rem;
    text-align: left;
}

.about-content {
    padding: 0 10%;
}

.about-content h2 {
    text-align: left;
    line-height: 1.2;
}

.about-content h3 {
    font-size: 3rem;
}

.about-content p {
    font-size: 1.6rem;
    line-height: 1.8;
    margin: 2rem 0 3rem;
}

/* Services */
.services h2 {
    margin-bottom: 5rem;
    text-align: center;
}

.services-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.services-container .services-box {
    flex: 1 1 30rem;
    background: var(--snd-bg-color);
    padding: 6rem 2rem 6rem;
    border-radius: 2rem;
    text-align: center;
    border: 0.3rem solid var(--bg-color);
    transition: 0.3s ease;
}

.services-container .services-box:hover {
    border-color: var(--main-color);
    transform: scale(1.05);
}

.services-box i {
    font-size: 7rem;
    color: var(--main-color);
    margin-bottom: 5%;
}

.services-box h3 {
    font-size: 2.6rem;
}

.services-box p {
    font-size: 1.6rem;
    margin: 1rem 0 3rem;
}

/* Portfolio */
.portfolio {
    background: var(--snd-bg-color);
}

.portfolio-box {
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.portfolio .heading {
    margin-bottom: 5rem;
}

.portfolio-box img {
    width: 15rem;
    border-radius: 50%;
    border: 3px solid var(--main-color);
    box-shadow: 0 0 25px var(--main-color);
}

.wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.portfolio-item {
    min-height: 450px;
    max-width: 450px;
    background: var(--bg-color);
    border: 0.3rem solid var(--bg-color);
    border-radius: 2rem;
    padding: 20px 20px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-color);
    transition: 0.3s ease;
}

.portfolio-item:hover {
    border-color: var(--main-color);
    transform: scale(1.05);
}

.portfolio-item h2 {
    font-size: 3rem;
}

.portfolio-item p {
    font-size: 1.8rem;
    line-height: 1.8;
    text-align: center;
}

/* Contact */
.contact {
    background: var(--bg-color);
}

.contact .heading {
    text-align: center;
    margin-bottom: 5rem;
}

.contact h2 {
    margin-bottom: 3rem;
    color: var(--text-color);
}

.contact form {
    max-width: 80rem;
    margin: 1rem auto;
    text-align: center;
    margin-bottom: 3rem;
}

.contact form .input-box {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--bg-color);
    border-radius: 0.8rem;
    border: 0.25rem solid var(--main-color);
    margin: 1rem 0;
    resize: none;
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.contact form .input-box input::placeholder,
.contact form textarea::placeholder {
    color: #888;
    opacity: 1;
}

[data-theme="dark"] .contact form .input-box input::placeholder,
[data-theme="dark"] .contact form textarea::placeholder {
    color: #6e7681;
}

.contact form .input-box input {
    width: 49%;
    margin: 0.7rem 0.35rem;
}

.contact form .btn-box {
    margin-top: 2rem;
}

/* Footer */
.footer {
    position: relative;
    bottom: 0;
    width: 100%;
    padding: 10px 0;
    background-color: var(--snd-bg-color);
}

.footer .home-sci {
    text-align: center;
    padding-bottom: 25px;
    color: var(--main-color);
}

.footer .home-sci a {
    font-size: 25px;
    color: var(--main-color);
    border: 2px solid var(--main-color);
    width: 42px;
    height: 42px;
    line-height: 42px;
    display: inline-block;
    text-align: center;
    border-radius: 50%;
    margin: 0 10px;
    transition: 0.3s ease;
}

.footer .home-sci a:hover {
    background: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--main-color);
    transform: scale(1.2) translateY(-10px);
}

.footer .copyright {
    margin-top: 0px;
    text-align: center;
    font-size: 16px;
    color: var(--main-color);
}

/* Visitor Tracking Styles */
.visitor-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.visitor-popup.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.popup-content {
    background: var(--bg-color);
    padding: 3rem;
    border-radius: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 0 25px var(--main-color);
    position: relative;
}

.popup-content h3 {
    font-size: 2.4rem;
    margin-bottom: 1.5rem;
    color: var(--main-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.popup-content p {
    font-size: 1.6rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input {
    width: 100%;
    padding: 1.2rem;
    border: 2px solid var(--main-color);
    border-radius: 1rem;
    font-size: 1.6rem;
    background: var(--snd-bg-color);
    transition: 0.3s;
}

.form-group input:focus {
    box-shadow: 0 0 10px var(--main-color);
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.4rem;
    cursor: pointer;
}

.popup-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.submit-btn,
.skip-btn {
    flex: 1;
    padding: 1.2rem;
    border: none;
    border-radius: 1rem;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.submit-btn {
    background: var(--main-color);
    color: var(--bg-color);
}

.submit-btn:hover {
    box-shadow: 0 0 15px var(--main-color);
}

.skip-btn {
    background: var(--snd-bg-color);
    color: var(--text-color);
}

.skip-btn:hover {
    background: #e0e0e0;
}

.visitor-count {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--snd-bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 1.4rem;
    color: var(--main-color);
}

/* Visitor Dashboard */
.visitor-dashboard {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1000px;
    max-height: 80vh;
    background: var(--bg-color);
    border-radius: 2rem;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    display: none;
    overflow: hidden;
}

.visitor-dashboard.active {
    display: block;
    animation: slideUp 0.3s ease;
}

.dashboard-header {
    background: var(--main-color);
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.dashboard-header h3 {
    font-size: 2.4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.close-dashboard {
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
}

.dashboard-content {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--snd-bg-color);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    border: 2px solid transparent;
    transition: 0.3s;
}

.stat-card:hover {
    border-color: var(--main-color);
    transform: translateY(-5px);
}

.stat-card h4 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--main-color);
}

.visitor-list {
    background: var(--snd-bg-color);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.visitor-list h4 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.list-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.list-content {
    max-height: 300px;
    overflow-y: auto;
}

.visitor-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #ddd;
    font-size: 1.4rem;
}

.visitor-item:last-child {
    border-bottom: none;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #999;
    font-size: 1.6rem;
}

.export-btn {
    width: 100%;
    padding: 1.5rem;
    background: var(--main-color);
    color: white;
    border: none;
    border-radius: 1rem;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: 0.3s;
}

.export-btn:hover {
    box-shadow: 0 0 20px var(--main-color);
}

.admin-access-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--main-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--main-color);
    transition: 0.3s;
}

.admin-access-btn:hover {
    transform: scale(1.1);
}

.visitor-stats-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.visit-counter {
    display: inline-block;
    margin-left: 2rem;
    font-size: 1.4rem;
    color: var(--main-color);
}

#siteVisits {
    font-weight: 700;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Responsive – Portfolio */
@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }

    .home {
        gap: 5rem;
        padding-left: 5%;
    }

    .home-img img {
        width: 35vw;
        height: 300px;
    }

    .about-content .heading {
        text-align: center;
    }
}

@media (max-width: 991px) {
    .header {
        padding: 2rem 3%;
    }

    section {
        padding: 10rem 3%;
    }

    .services {
        padding: 7rem;
    }

    .portfolio .wrapper {
        grid-template-columns: repeat(1, 1fr);
    }

    .contact form .input-box input {
        width: 100%;
    }

    .footer {
        padding: 2rem 3%;
    }

    .about-content .heading {
        text-align: center;
    }
}

@media (max-width: 991px) {
    #menu-icon {
        display: block;
    }

    .navbar {
        position: absolute;
        top: 100%;
        right: 100%;
        width: 150px;
        display: flex;
        flex-direction: column;
        background: var(--main-color);
        transition: all 0.5s ease;
        backdrop-filter: blur(10px);
        border-radius: 0 0 0 30px;
    }

    .navbar a {
        display: block;
        padding: 17px;
        font-size: 22px;
    }

    .navbar.active {
        right: 0;
    }

    .home {
        flex-direction: column;
    }

    .home-content h3 {
        font-size: 2.6rem;
    }

    .home-content h1 {
        font-size: 5rem;
    }

    .home-content {
        order: 2;
        margin-left: 1rem;
    }

    .home-img img {
        width: 70vw;
        margin-top: 4rem;
    }

    .about {
        flex-direction: column-reverse;
    }

    .about-img img {
        width: 70vw;
        margin-top: 4rem;
    }

    .about-content .heading {
        text-align: center;
    }

    .services h2 {
        margin-bottom: 3rem;
    }
}

@media (max-width: 850px) {
    .home {
        flex-direction: column;
        padding-top: 12rem;
        gap: 3rem;
    }

    .home-img img {
        width: 60vw;
    }

    .home-content {
        text-align: center;
    }

    .about-content .heading {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .about {
        flex-direction: column-reverse;
        text-align: center;
    }

    .about-img img {
        width: 60vw;
    }

    .heading {
        text-align: center;
    }

    .about-content .heading {
        text-align: center;
    }

    .popup-content {
        padding: 2rem;
    }

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

    .list-header,
    .visitor-item {
        grid-template-columns: repeat(2, 1fr);
        font-size: 1.2rem;
    }

    .visitor-dashboard {
        width: 95%;
    }
}

@media (max-width: 617px) {
    .home-img img {
        width: 70vw;
        margin-top: 8rem;
    }

    .about-img img {
        width: 70vw;
        margin-top: 4rem;
    }

    .about-content .heading {
        text-align: center;
    }

    html {
        font-size: 50%;
    }
}


/* Smooth theme transitions */
body,
.header,
section,
.footer,
.about,
.portfolio,
.contact,
.services-container .services-box,
.portfolio-item,
.popup-content,
.visitor-dashboard {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Dark Mode Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 7rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--main-color);
    color: #081b29;
    border: none;
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--main-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px var(--main-color);
}

/* Theme toggle embedded in navbar */
.theme-toggle-nav {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 20px;
    transition: transform 0.3s, border-color 0.3s;
    vertical-align: middle;
    line-height: 1;
    padding: 0;
}

.theme-toggle-nav:hover {
    transform: scale(1.15);
    border-color: #fff;
}

/* Share my age button */
.share-age-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(to right, #9b59b6, #8e44ad);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4);
}

.share-age-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(155, 89, 182, 0.6);
}

.share-age-btn.copied {
    background: linear-gradient(to right, #2ecc71, #27ae60);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4);
}

/* Age-calc header theme toggle wrapper */
.age-header-top {
    display: flex;
    justify-content: flex-end;
    padding: 10px 15px 0;
}

.age-header-theme-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.3s;
}

.age-header-theme-btn:hover {
    background: rgba(255,255,255,0.35);
    transform: scale(1.1);
}

/* Contact form spinner */
.submit-contact-btn {
    position: relative;
}

.btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.submit-contact-btn.sending .btn-spinner {
    display: inline-block;
}

/* Popup countdown bar */
.popup-timer-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--main-color);
    width: 100%;
    border-radius: 0 0 2rem 2rem;
    transform-origin: left;
    animation: timerShrink 10s linear forwards;
}

@keyframes timerShrink {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--snd-bg-color);
    border-top: 3px solid var(--main-color);
    padding: 1.5rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    z-index: 99999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    animation: slideUpBanner 0.4s ease;
}

@keyframes slideUpBanner {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.cookie-banner p {
    font-size: 1.4rem;
    color: var(--text-color);
    flex: 1;
    min-width: 200px;
}

.cookie-banner p a {
    color: var(--main-color);
    text-decoration: underline;
    font-size: 1.4rem;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

.cookie-accept,
.cookie-reject {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 5rem;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.cookie-accept {
    background: var(--main-color);
    color: #081b29;
}

.cookie-accept:hover {
    box-shadow: 0 0 15px var(--main-color);
}

.cookie-reject {
    background: transparent;
    border: 2px solid var(--main-color);
    color: var(--main-color);
}

.cookie-reject:hover {
    background: var(--main-color);
    color: #081b29;
}

/* Contact form feedback */
.form-feedback {
    margin-top: 1.5rem;
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    font-size: 1.6rem;
    font-weight: 600;
    text-align: center;
    display: none;
}

.form-feedback.success {
    background: rgba(46, 204, 113, 0.15);
    border: 2px solid #2ecc71;
    color: #2ecc71;
    display: block;
}

.form-feedback.error {
    background: rgba(231, 76, 60, 0.15);
    border: 2px solid #e74c3c;
    color: #e74c3c;
    display: block;
}

.btn-box[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Dark mode overrides for age calc page */
[data-theme="dark"] body.age-calc-body {
    background: linear-gradient(135deg, #0d1117, #1a0a0a, #0d1117);
}

[data-theme="dark"] .age-calc-page .container,
[data-theme="dark"] body.age-calc-body .container {
    background: rgba(22, 27, 34, 0.98);
}

[data-theme="dark"] .card {
    background: #1c2128;
}

[data-theme="dark"] .card-header {
    background: #161b22;
    border-bottom-color: #30363d;
}

[data-theme="dark"] .card-header h3,
[data-theme="dark"] .unit-label {
    color: #c9d1d9;
}

[data-theme="dark"] .time-unit {
    border-bottom-color: #30363d;
}

[data-theme="dark"] body.age-calc-body .footer {
    border-top-color: #30363d;
    color: #8b949e;
}


/* -------------------------------------------------------
   SECTION 2 – AGE CALCULATOR PAGE  (originally styless.css)
   Scoped under body.age-calc-body / .age-calc-page where possible.
   ------------------------------------------------------- */

/* Body override for the age calculator standalone page.
   Wrap <body> content in <div class="age-calc-page"> when
   embedding, or apply these styles only on Your_Age.html  */
.age-calc-page,
body.age-calc-body {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body.age-calc-body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.2)"/><circle cx="50" cy="50" r="3" fill="rgba(255,255,255,0.2)"/><circle cx="80" cy="80" r="1.5" fill="rgba(255,255,255,0.2)"/></svg>');
    z-index: -1;
}

/* Container */
.age-calc-page .container,
body.age-calc-body .container {
    width: 100%;
    max-width: 900px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    z-index: 10;
    margin: auto;
}

/* Header */
body.age-calc-body header {
    background: linear-gradient(to right, var(--age-header-start), var(--age-header-end));
    color: white;
    text-align: center;
    padding: 25px 20px;
    position: relative;
    overflow: hidden;
    /* reset fixed positioning from portfolio header */
    top: auto;
    right: auto;
    width: auto;
}

body.age-calc-body header::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, #3498db, #e74c3c, #9b59b6, #2ecc71);
    animation: rainbow 3s linear infinite;
}

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

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

body.age-calc-body h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    /* unset portfolio h1 overrides */
    font-weight: 700;
    opacity: 1;
    animation: none;
    position: static;
    color: white;
    overflow: visible;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.content {
    padding: 30px;
}

.input-group {
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

body.age-calc-body label {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
    color: #2c3e50;
}

.input-container {
    position: relative;
    display: inline-block;
    margin: 0 auto;
}

#dob {
    width: 100%;
    max-width: 300px;
    padding: 14px 50px 14px 20px;
    border: 2px solid #3498db !important;
    border-radius: 50px;
    font-size: 1.1rem;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    outline: none;
}

#dob:focus {
    border-color: #e74c3c !important;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.3);
}

.scroll-buttons {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.scroll-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #3498db;
    color: white;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.scroll-btn:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.btn {
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.6);
}

.btn:active {
    transform: translateY(1px);
}

/* Results grid */
.results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    border-top: 5px solid #3498db;
    position: relative;
}

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

.card.next-birthday {
    border-top-color: #e74c3c;
}

.card.zodiac {
    border-top-color: #9b59b6;
}

.card.fun-facts {
    border-top-color: #2ecc71;
}

.card-header {
    background: #f8f9fa;
    padding: 18px 20px;
    border-bottom: 1px solid #eee;
}

.card-header h3 {
    font-size: 1.4rem;
    color: var(--age-label-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 25px;
}

.time-unit {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
}

.time-unit:last-child {
    border-bottom: none;
}

.unit-label {
    font-weight: 600;
    color: var(--age-label-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.unit-value {
    font-weight: 700;
    color: #e74c3c;
    font-family: monospace;
    font-size: 1.2rem;
    min-width: 70px;
    text-align: right;
}

body.age-calc-body .footer {
    text-align: center;
    padding: 25px;
    color: #7f8c8d;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    /* reset portfolio footer */
    position: static;
    background-color: transparent;
    width: auto;
}

@media (max-width: 768px) {
    .results {
        grid-template-columns: 1fr;
    }

    body.age-calc-body h1 {
        font-size: 2rem;
    }
}

.highlight {
    background: linear-gradient(120deg, rgba(231, 76, 60, 0.1), rgba(231, 76, 60, 0.05));
    border-radius: 8px;
    padding: 2px 8px;
}

.info {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #7f8c8d;
    text-align: center;
}

.icon {
    width: 40px;
    height: 40px;
    background: #3498db;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.icon.next {
    background: #e74c3c;
}

.icon.zodiac {
    background: #9b59b6;
}

.icon.fun {
    background: #2ecc71;
}

/* Zodiac */
.zodiac-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
}

.zodiac-icon {
    font-size: 3rem;
    color: #9b59b6;
}

.zodiac-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--age-zodiac-name);
}

.zodiac-dates {
    color: #7f8c8d;
    font-style: italic;
}

/* Fun fact */
.fun-fact-content {
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    padding: 10px;
    border-left: 3px solid #2ecc71;
    background: rgba(46, 204, 113, 0.05);
    border-radius: 0 10px 10px 0;
}

.fun-fact-title {
    text-align: center;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2ecc71;
}

/* Real-time indicator */
.real-time-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #e74c3c;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: pulse 1.5s infinite;
    z-index: 20;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.counter-animation {
    animation: counterChange 0.5s ease;
}

@keyframes counterChange {
    0% {
        transform: translateY(5px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Birthday Popup */
.birthday-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.birthday-popup.active {
    opacity: 1;
    pointer-events: all;
}

.birthday-content {
    background: linear-gradient(135deg, #ff9a9e, #fad0c4);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.5s ease;
}

.birthday-popup.active .birthday-content {
    transform: scale(1);
}

.birthday-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="10" cy="10" r="8" fill="rgba(255,255,255,0.2)"/><circle cx="90" cy="20" r="6" fill="rgba(255,255,255,0.2)"/><circle cx="50" cy="90" r="10" fill="rgba(255,255,255,0.2)"/></svg>');
    z-index: -1;
}

.birthday-icon {
    font-size: 5rem;
    color: #e74c3c;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-30px);
    }

    60% {
        transform: translateY(-15px);
    }
}

.birthday-title {
    font-size: 2.5rem;
    color: #d35400;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.birthday-message {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 30px;
    line-height: 1.6;
}

.birthday-fact {
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 30px;
    font-style: italic;
}

.close-popup {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.close-popup:hover {
    background: #c0392b;
    transform: scale(1.05);
}

/* Confetti */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #f00;
    animation: confetti-fall 5s linear infinite;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.scroll-info {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #3498db;
    font-style: italic;
}