:root {
    /* Color Palette - Light Mode */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #64748b;
    --accent: #8b5cf6;
    --bg-main: #ffffff;
    --bg-alt: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #475569;
    --border: #e2e8f0;
    --navbar-bg: rgba(255, 255, 255, 0.8);
    --card-bg: #ffffff;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --glass: rgba(255, 255, 255, 0.7);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --secondary: #94a3b8;
    --accent: #a78bfa;
    --bg-main: #020617;
    --bg-alt: #0f172a;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #1e293b;
    --navbar-bg: rgba(2, 6, 23, 0.8);
    --card-bg: #1e293b;
    --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.5);
    --glass: rgba(15, 23, 42, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
.logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Loader */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-main);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    z-index: 1000;
    transition: var(--transition);
    padding: 0.8rem 0;
}

[data-theme="dark"] .navbar {
    background: rgba(10, 15, 25, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    text-decoration: none;
    font-size: 1.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
    background: var(--bg-alt);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

.icon-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--bg-alt);
}

/* Theme Icons */
[data-theme="light"] .sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

/* Hero */
.hero {
    padding: 220px 0 120px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 40%);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08), transparent 70%);
    filter: blur(60px);
    z-index: -1;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 5rem;
    align-items: center;
}

.hero h1 {
    font-size: 4.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero .tagline {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 540px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1.25rem;
}

.visual-placeholder {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
}

.visual-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.visual-placeholder img {
    width: 100%;
    height: auto;
    display: block;
    transform: perspective(1000px) rotateY(-5deg);
    transition: var(--transition);
}

.hero-visual:hover .visual-placeholder {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 60px 100px rgba(37, 99, 235, 0.15);
}

.hero-visual:hover .visual-placeholder img {
    transform: perspective(1000px) rotateY(0deg);
}

/* Sections */
.section {
    padding: 100px 0;
}

.bg-alt {
    background-color: var(--bg-alt);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Feature Cards */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Detailed Features */
.detailed-features {
    display: grid;
    gap: 3rem;
}

.feature-item {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    border-left: 4px solid var(--primary);
}

/* Download Card */
.download-card {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    padding: 4rem;
    border-radius: 32px;
    text-align: center;
}

.download-card h2 {
    margin-bottom: 1rem;
}

.download-options {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.download-meta {
    font-size: 0.9rem;
    opacity: 0.8;
}

.download-meta a {
    color: #fff;
    text-decoration: underline;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.gallery-image-container {
    position: relative;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 16px;
    height: 300px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.gallery-image-container:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Specific Focus Points for the single UI Preview Image */
.dashboard-focus {
    object-position: center top;
}

.transfer-focus {
    object-position: 85% center;
}

.mobile-focus {
    object-position: 15% center;
}

.gallery-image-container:hover .gallery-img {
    transform: scale(1.1);
}

/* Donation */
.donation-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.charity-box {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-alt);
    border-radius: 12px;
}

.charity-note {
    font-style: italic;
    color: var(--primary);
    margin-top: 0.5rem;
}

.donation-form-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.amount-presets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.preset-btn {
    padding: 1rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-main);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.preset-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.custom-amount {
    margin-bottom: 1.5rem;
}

.custom-amount label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.custom-amount input {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--text-main);
    font-size: 1rem;
}

/* Transparency */
.transparency-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    max-width: 800px;
    margin: 0 auto;
}

.disclaimer {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--text-main);
}

/* Contact Methods */
.contact-methods {
    margin-top: 1.5rem;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #25D366;
    color: white !important;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
}

/* Footer */
.footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    backdrop-filter: blur(4px);
    overflow-y: auto;
}

.modal-content {
    background: var(--card-bg);
    max-width: 500px;
    margin: 5vh auto;
    border-radius: 24px;
    padding: 2rem;
    position: relative;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #10b981;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
}

/* Animations */
[data-reveal] {
    opacity: 0;
    transition: all 0.8s ease;
}

[data-reveal="bottom"] {
    transform: translateY(50px);
}

[data-reveal="left"] {
    transform: translateX(-50px);
}

[data-reveal="right"] {
    transform: translateX(50px);
}

[data-reveal="scale"] {
    transform: scale(0.9);
}

[data-reveal].active {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Responsive */
@media (max-width: 992px) {
    .nav-links {
        display: none;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero h1 {
        font-size: 2.75rem;
    }

    .donation-container {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section h2 {
        font-size: 2rem;
    }

    .download-card {
        padding: 2rem;
    }

    .download-options {
        flex-direction: column;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Professional Receipt Styles */
.receipt-outer {
    max-width: 650px !important;
    padding: 2rem !important;
}

.receipt-card {
    background: #fff;
    color: #333;
    padding: 2.5rem;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    font-family: 'Inter', sans-serif;
}

.receipt-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 1.5rem;
}

.trust-info h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    margin: 0;
    color: var(--primary);
    letter-spacing: 1px;
}

.trust-address,
.trust-reg {
    font-size: 0.85rem;
    margin: 0.2rem 0;
    color: #666;
}

.receipt-title {
    text-align: center;
    margin-bottom: 2rem;
}

.receipt-title h3 {
    display: inline-block;
    padding: 0.5rem 2rem;
    border-bottom: 1px solid #ddd;
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: #444;
}

.receipt-body {
    margin-bottom: 2.5rem;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.receipt-row .label {
    font-weight: 600;
    color: #777;
}

.receipt-row .value {
    color: #222;
    font-weight: 500;
}

.receipt-row.highlight {
    background: #f8faff;
    padding: 1rem;
    border-radius: 4px;
    border-bottom: none;
    margin-top: 1rem;
}

.receipt-row.highlight .value {
    color: var(--primary);
}

.receipt-footer {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

.trust-contact {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.receipt-subtitle {
    font-size: 1rem;
    color: var(--primary);
    font-weight: 500;
}

.signature-area {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 3rem;
}

.seal {
    width: 120px;
    height: 120px;
    border: 2px dashed var(--primary);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--primary);
    transform: rotate(-15deg);
    padding: 10px;
    opacity: 0.6;
    background: rgba(37, 99, 235, 0.05);
}

.seal span {
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
}

.seal small {
    font-size: 0.6rem;
    opacity: 0.8;
}

.sign-block {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.legal-statement {
    font-size: 0.75rem;
    color: #888;
    max-width: 250px;
    line-height: 1.4;
    font-style: italic;
    margin-bottom: 2rem;
}

.sign {
    border-top: 1px solid #444;
    padding-top: 0.5rem;
    width: 200px;
    color: #444;
    font-weight: 600;
}

.receipt-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.donor-details-form {
    text-align: left;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-grid .form-group:last-child {
    grid-column: span 2;
}

.donor-details-form input,
.donor-details-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-alt);
    color: var(--text-main);
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid .form-group:last-child {
        grid-column: span 1;
    }
}

@media print {

    /* Hide everything except the modal content */
    body>*:not(#thank-you-modal) {
        display: none !important;
    }

    #thank-you-modal {
        display: block !important;
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: auto !important;
        background: white !important;
        padding: 0 !important;
        margin: 0 !important;
        backdrop-filter: none !important;
        overflow: visible !important;
    }

    .modal-content {
        max-width: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: white !important;
    }

    #printable-receipt {
        visibility: visible !important;
        display: block !important;
        width: 180mm !important;
        /* Perfect for A4 */
        margin: 10mm auto !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }

    #printable-receipt * {
        visibility: visible !important;
    }

    .receipt-outer {
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Remove URL, date, and other browser-injected text */
    @page {
        margin: 0;
        size: auto;
    }

    .no-print {
        display: none !important;
    }

    /* Force background colors and images in some browsers */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}