/* css/style.css - Complete CSS for mathgen.online */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: linear-gradient(145deg, #f0f4ff 0%, #e9edfa 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    overflow-x: hidden;
    width: 100%;
}

/* animated background blobs */
.blob {
    position: fixed;
    width: min(400px, 80vw);
    height: min(400px, 80vw);
    background: rgba(165, 180, 252, 0.15);
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    animation: float 18s infinite alternate ease-in-out;
    pointer-events: none;
}

.blob-1 {
    top: -150px;
    left: -100px;
    background: rgba(99, 102, 241, 0.15);
}

.blob-2 {
    bottom: -150px;
    right: -80px;
    width: min(500px, 90vw);
    height: min(500px, 90vw);
    background: rgba(244, 114, 182, 0.1);
    animation-duration: 22s;
}

.blob-3 {
    top: 50%;
    left: 60%;
    width: min(350px, 70vw);
    height: min(350px, 70vw);
    background: rgba(52, 211, 153, 0.1);
    animation: float 20s reverse infinite;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(70px, -50px) scale(1.2); }
}

/* navbar - center only logo */
.navbar {
    position: relative;
    z-index: 100;
    width: 100%;
    max-width: 600px;
    margin: 2rem auto 1rem;
    padding: 0 1rem;
    animation: navGlide 0.8s ease-out;
}

@keyframes navGlide {
    0% { opacity: 0; transform: translateY(-30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.nav-container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border-radius: 80px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 15px 35px -10px rgba(30, 30, 80, 0.15);
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    justify-content: center;
}

.logo-img {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 8px 15px rgba(255, 255, 255, 0.3);
    animation: logoFloat 3s infinite ease-in-out;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 620;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1f1b4b, #312e81);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-text span {
    font-weight: 300;
    font-size: 0.9rem;
    background: #e0e7ff;
    padding: 0.2rem 0.6rem;
    border-radius: 40px;
    color: #4338ca;
    margin-left: 0.3rem;
    border: 1px solid rgba(255,255,255,0.6);
}

/* main content area */
.main-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1000px;
    margin: 1rem auto 2rem;
    padding: 0 1rem;
    flex: 1;
}

/* hero section */
.hero-section {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    border-radius: 40px;
    padding: 1.8rem 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: heroGlide 0.7s ease-out;
}

@keyframes heroGlide {
    0% { opacity: 0; transform: translateX(-20px); }
    100% { opacity: 1; transform: translateX(0); }
}

.hero-title {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 700;
    background: linear-gradient(135deg, #1e1b4b, #4f46e5);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.8rem;
    line-height: 1.2;
    text-align: center;
}

.hero-text {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: #1f2937;
    max-width: 700px;
    opacity: 0.9;
    text-align: center;
    margin: 0 auto;
}

/* calculator card */
.card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border-radius: 48px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 30px 60px -20px rgba(30, 30, 80, 0.2);
    padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.2rem, 3vw, 2rem);
    margin-bottom: 2rem;
}

.header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.header i {
    font-size: clamp(2rem, 5vw, 2.4rem);
    color: #4f46e5;
    filter: drop-shadow(0 6px 10px rgba(79, 70, 229, 0.25));
    animation: subtleSpin 6s infinite linear;
}

@keyframes subtleSpin {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(6deg); }
    75% { transform: rotate(-6deg); }
}

.header h2 {
    font-size: clamp(1.6rem, 4vw, 2rem);
    font-weight: 620;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1f1b4b, #312e81);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* input group */
.input-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.input-field {
    background: rgba(255,255,255,0.6);
    border-radius: 32px;
    padding: 0.6rem 1rem 0.9rem 1rem;
    border: 1.5px solid rgba(255,255,255,0.7);
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    box-shadow: 0 8px 12px -8px rgba(0,0,0,0.1);
}

.input-field:focus-within {
    border-color: #a78bfa;
    background: white;
    box-shadow: 0 14px 22px -12px #c7d2fe;
    transform: scale(1.02);
}

.input-field label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #4b5563;
    margin-bottom: 0.2rem;
}

.input-field input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: clamp(1.3rem, 4vw, 1.7rem);
    font-weight: 600;
    color: #1e1b4b;
    outline: none;
    line-height: 1.2;
    padding: 0;
}

/* calculate button */
.calc-btn {
    background: linear-gradient(115deg, #4f46e5, #7c3aed);
    border: none;
    border-radius: 60px;
    padding: 1rem 1.5rem;
    width: 100%;
    color: white;
    font-size: clamp(1.2rem, 4vw, 1.4rem);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 18px 28px -14px #4f46e5;
    transition: all 0.2s ease;
    margin-bottom: 2rem;
}

.calc-btn:hover {
    transform: scale(1.01) translateY(-2px);
    box-shadow: 0 28px 36px -16px #4f46e5;
}

.calc-btn:hover i {
    transform: translateX(4px) rotate(-5deg);
}

/* result panel */
.result-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric {
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);
    border-radius: 34px;
    padding: 1.2rem 0.5rem;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 16px 24px -16px rgba(80, 70, 180, 0.2);
    transition: 0.2s;
}

.metric:hover {
    background: white;
    transform: translateY(-4px);
}

.metric .value {
    font-size: clamp(2rem, 6vw, 2.7rem);
    font-weight: 700;
    color: #1e293b;
    line-height: 1.1;
}

.metric .label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #4b5563;
    text-transform: uppercase;
}

/* extra details */
.extra-details {
    display: flex;
    justify-content: space-between;
    background: rgba(255,255,255,0.3);
    backdrop-filter: blur(4px);
    border-radius: 60px;
    padding: 0.8rem 1.5rem;
    border: 1px solid rgba(255,255,255,0.45);
    font-size: 0.95rem;
    color: #1f2937;
    flex-wrap: wrap;
    gap: 1rem;
}

.extra-details div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.extra-details i {
    color: #4f46e5;
    font-size: 1rem;
}

.extra-details span {
    font-weight: 600;
    color: #0f172a;
    background: rgba(255,255,255,0.7);
    padding: 0.2rem 0.8rem;
    border-radius: 40px;
}

/* SEO content */
.seo-content {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    border-radius: 40px;
    padding: 2.5rem;
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.seo-content h2 {
    font-size: 2rem;
    color: #1e1b4b;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid rgba(79, 70, 229, 0.2);
    padding-bottom: 0.8rem;
}

.seo-content h2 i {
    color: #4f46e5;
}

.seo-content h3 {
    font-size: 1.4rem;
    color: #2d3a4f;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.seo-content p {
    color: #374151;
    line-height: 1.8;
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

.seo-content ul, .seo-content ol {
    margin: 1rem 0 1.5rem 2rem;
    color: #4b5563;
}

.seo-content li {
    margin-bottom: 0.7rem;
    line-height: 1.6;
}

.seo-content strong {
    color: #4f46e5;
}

/* FAQ section */
.faq-section {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    border-radius: 40px;
    padding: 2.5rem;
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.faq-section h2 {
    font-size: 2rem;
    color: #1e1b4b;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid rgba(79, 70, 229, 0.2);
    padding-bottom: 0.8rem;
}

.faq-item {
    background: rgba(255,255,255,0.4);
    border-radius: 24px;
    padding: 1.3rem 1.8rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.5);
}

.faq-item:hover {
    background: rgba(255,255,255,0.7);
    transform: translateX(5px);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #1e1b4b;
    font-size: 1.15rem;
}

.faq-question i {
    color: #4f46e5;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: #4b5563;
    line-height: 1.7;
    margin-top: 0;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    margin-top: 1.2rem;
}

/* footer */
.footer {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 600px;
    margin: 1rem auto 2rem;
    padding: 0 1rem;
    animation: footerGlide 0.8s ease-out;
}

@keyframes footerGlide {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.footer-container {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    border-radius: 60px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-content {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
    padding: 0.4rem 1rem;
    background: rgba(255,255,255,0.3);
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.5);
    font-size: 0.95rem;
}

.footer-links a:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px #4f46e5;
}

.copyright {
    color: #4b5563;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.copyright i {
    color: #f472b6;
    animation: heartBeat 1.5s infinite;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
}

/* back to top button */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
    border: 2px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.back-to-top:hover {
    transform: scale(1.1);
    animation: none;
}

@keyframes pop {
    0% { opacity: 0; transform: scale(0.88); }
    100% { opacity: 1; transform: scale(1); }
}

/* responsive */
@media (max-width: 768px) {
    .input-group {
        grid-template-columns: 1fr;
    }
    .result-panel {
        grid-template-columns: 1fr;
    }
    .seo-content, .faq-section {
        padding: 1.5rem;
    }
    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .logo-text {
        font-size: 1.4rem;
    }
    .logo-img {
        width: 200px;
        height: 50px;
        font-size: 1.3rem;
    }
    .hero-section {
        padding: 1.5rem;
    }
}
/* logo image styling */
.logo-img {
    width: 200px;
    height: 50px;
    object-fit: contain; /* ensures logo fits properly */
    border-radius: 50%; /* agar circular chahiye to, warna hata dein */
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}