:root {
    --primary: #8a2be2;
    --primary-light: #b05bff;
    --primary-dark: #5e11a6;
    --secondary: #ff007f;
    --bg-dark: #0f0c29;
    --bg-mid: #302b63;
    --bg-light: #24243e;
    --text-main: #ffffff;
    --text-muted: #a0a0b8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-mid), var(--bg-light));
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Animated Blobs */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
    animation: float 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.2); }
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.header {
    padding: 20px 0;
    background: rgba(15, 12, 41, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary-light);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a, .mobile-nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active,
.mobile-nav-links a:hover, .mobile-nav-links a.active {
    color: var(--text-main);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text-main);
    transition: var(--transition);
}

.mobile-nav {
    display: none;
    background: rgba(15, 12, 41, 0.95);
    backdrop-filter: blur(10px);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.mobile-nav.active {
    display: block;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 60px 20px;
}

.hero {
    text-align: center;
    margin-bottom: 60px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    background: linear-gradient(to right, #fff, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Calculators Grid */
.calculators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

/* Glass Card Style */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    padding: 30px;
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

.calculator-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card-header h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header .icon {
    font-size: 1.8rem;
}

.card-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Form Elements */
.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

input[type="number"], input[type="text"], input[type="email"], textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    background: rgba(0, 0, 0, 0.4);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
}

/* Result Box */
.result-box {
    margin-top: 25px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-box h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-align: center;
}

.total-amount {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    color: var(--primary-light);
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(176, 91, 255, 0.3);
}

.result-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-item span:first-child {
    color: var(--text-muted);
}

.detail-item span:last-child {
    font-weight: 600;
}

/* Page Content (About, Privacy, Terms) */
.content-page {
    max-width: 800px;
}

.page-card {
    padding: 40px;
}

.page-card h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 20px;
    color: var(--primary-light);
}

.page-content h2 {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #fff;
}

.page-content p {
    margin-bottom: 15px;
    color: var(--text-muted);
    line-height: 1.8;
}

.page-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
    color: var(--text-muted);
}

.page-content li {
    margin-bottom: 10px;
}

.contact-form {
    margin-top: 30px;
}

/* AdSense Placeholder */
.ad-placeholder {
    width: 100%;
    margin: 40px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed var(--glass-border);
    border-radius: 10px;
    text-align: center;
    color: var(--text-muted);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid var(--glass-border);
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-light);
}

.footer-brand p {
    color: var(--text-muted);
}

.footer-links h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #fff;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .calculators-grid {
        grid-template-columns: 1fr;
    }

    .page-card {
        padding: 20px;
    }
}
