/* ============================================
   CSS Variables & Base Styles
   ============================================ */
:root {
    /* Colors - Light Mode */
    --background: #fafafa;
    --foreground: #171717;
    --card: #ffffff;
    --card-foreground: #171717;
    --primary: #2d1b69;
    --primary-foreground: #fafafa;
    --secondary: #14b8a6;
    --secondary-foreground: #fafafa;
    --muted: #f5f5f5;
    --muted-foreground: #737373;
    --accent: #14b8a6;
    --accent-foreground: #fafafa;
    --border: #e5e5e5;
    --input: #e5e5e5;
    --ring: #14b8a6;
    --radius: 0.5rem;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Dark page specific */
.dark-page {
    --background: #0a0a0f;
    --foreground: #fafafa;
    --card: #1a1a2e;
    --card-foreground: #fafafa;
    --muted: #2a2a3e;
    --muted-foreground: #a0a0b0;
    --border: #2a2a3e;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea {
    font-family: inherit;
}

/* ============================================
   Layout & Container
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
}

.btn-secondary:hover {
    background-color: #0d9488;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--foreground);
}

.btn-outline:hover {
    background-color: var(--muted);
}

.btn-gold {
    background: linear-gradient(to right, #fbbf24, #f59e0b);
    color: #1a1a2e;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

.btn-gold:hover {
    background: linear-gradient(to right, #f59e0b, #d97706);
}

.btn-gold:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.w-full {
    width: 100%;
}

/* ============================================
   Header
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(250, 250, 250, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 50;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon span {
    color: var(--primary-foreground);
    font-weight: 700;
    font-size: 1.125rem;
}

.logo-icon.light {
    background-color: rgba(255, 255, 255, 0.1);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1.2;
}

.logo-tagline {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    line-height: 1.2;
}

.nav-desktop {
    display: none;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

.header-cta {
    display: none;
}

.mobile-menu-btn {
    display: block;
    color: var(--foreground);
}

.nav-mobile {
    display: none;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
}

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

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
    
    .header-cta {
        display: block;
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .nav-mobile {
        display: none !important;
    }
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    padding: 8rem 1rem 5rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.hero-text {
    flex: 1;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.2);
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    margin-bottom: 1.5rem;
}

.hero-badge svg {
    color: var(--secondary);
}

.hero-badge span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--secondary);
}

.hero h1 {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-wrap: balance;
}

.hero p {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

.hero-image {
    flex: 1;
    width: 100%;
    max-width: 32rem;
    position: relative;
}

.hero-image-glow {
    position: absolute;
    inset: 0;
    background-color: rgba(20, 184, 166, 0.2);
    filter: blur(48px);
    border-radius: 9999px;
}

.hero-image img {
    position: relative;
    z-index: 10;
    width: 100%;
    border-radius: 1rem;
}

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
    }
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    .hero-content {
        flex-direction: row;
        text-align: left;
    }
    
    .hero-text {
        text-align: left;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .hero p {
        margin-left: 0;
    }
    
    .hero-buttons {
        justify-content: flex-start;
    }
}

/* ============================================
   Section Styles
   ============================================ */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    max-width: 42rem;
    margin: 0 auto;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .section-header h2 {
        font-size: 2.25rem;
    }
}

/* ============================================
   Cards
   ============================================ */
.card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* ============================================
   About Section
   ============================================ */
.about {
    padding: 5rem 1rem;
    background-color: var(--muted);
}

.features-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.feature-card {
    text-align: center;
    transition: box-shadow 0.3s;
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    background-color: rgba(20, 184, 166, 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.feature-icon svg {
    color: var(--secondary);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--muted-foreground);
    line-height: 1.6;
}

.mission-card {
    padding: 2rem;
    max-width: 48rem;
    margin: 0 auto;
}

.mission-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.mission-card p {
    color: var(--muted-foreground);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.mission-card p:last-child {
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .mission-card {
        padding: 3rem;
    }
}

/* ============================================
   Services Section
   ============================================ */
.services {
    padding: 5rem 1rem;
}

.services-grid {
    display: grid;
    gap: 1.5rem;
}

.service-card {
    padding: 2rem;
    transition: all 0.3s;
}

.service-card:hover {
    border-color: rgba(20, 184, 166, 0.5);
}

.service-icon {
    width: 3rem;
    height: 3rem;
    background-color: rgba(20, 184, 166, 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.service-icon svg {
    color: var(--secondary);
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--muted-foreground);
    line-height: 1.6;
}

.crypto-supported {
    margin-top: 3rem;
    background-color: rgba(45, 27, 105, 0.05);
    border: 1px solid rgba(45, 27, 105, 0.1);
    border-radius: 1rem;
    padding: 2rem;
}

.crypto-supported h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.crypto-supported > p {
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.crypto-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.crypto-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.crypto-dot {
    width: 0.5rem;
    height: 0.5rem;
    background-color: var(--secondary);
    border-radius: 50%;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .crypto-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   How It Works Section
   ============================================ */
.how-it-works {
    padding: 5rem 1rem;
    background-color: var(--muted);
}

.steps-grid {
    display: grid;
    gap: 1.5rem;
}

.step-card {
    position: relative;
    overflow: hidden;
    padding: 2rem;
    transition: box-shadow 0.3s;
}

.step-number-bg {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 4rem;
    font-weight: 700;
    color: var(--muted);
    opacity: 0.5;
    line-height: 1;
}

.step-content {
    position: relative;
}

.step-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.step-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.step-card p {
    color: var(--muted-foreground);
    line-height: 1.6;
}

.traceable-card {
    margin-top: 3rem;
    text-align: center;
    padding: 2rem;
}

.traceable-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.traceable-card p {
    color: var(--muted-foreground);
    line-height: 1.7;
    max-width: 48rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
    padding: 5rem 1rem;
}

.contact-grid {
    display: grid;
    gap: 2rem;
}

.contact-form-wrapper .card {
    padding: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    font-size: 1rem;
    background-color: var(--background);
    color: var(--foreground);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.form-message {
    text-align: center;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.form-message.success {
    color: #16a34a;
}

.form-message.error {
    color: #dc2626;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-card {
    padding: 1.5rem;
}

.contact-card.accent {
    background-color: rgba(20, 184, 166, 0.05);
    border-color: rgba(20, 184, 166, 0.2);
}

.contact-icon {
    width: 3rem;
    height: 3rem;
    background-color: rgba(20, 184, 166, 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.contact-card.accent .contact-icon {
    background-color: rgba(20, 184, 166, 0.2);
}

.contact-icon svg {
    color: var(--secondary);
}

.contact-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-card p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.contact-detail {
    display: block;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-top: 0.5rem;
}

.contact-email {
    font-size: 0.875rem;
    color: var(--secondary);
    word-break: break-all;
}

.contact-email:hover {
    text-decoration: underline;
}

@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: 2fr 1fr;
    }
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background-color: var(--primary);
    color: var(--primary-foreground);
    padding: 3rem 1rem;
}

.footer-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand p {
    font-size: 0.875rem;
    color: rgba(250, 250, 250, 0.8);
    line-height: 1.6;
    max-width: 28rem;
    margin-top: 1rem;
}

.footer-links h4,
.footer-contact h4 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links ul,
.footer-contact ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a,
.footer-contact a {
    font-size: 0.875rem;
    color: rgba(250, 250, 250, 0.8);
    transition: color 0.2s;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--primary-foreground);
}

.footer-bottom {
    border-top: 1px solid rgba(250, 250, 250, 0.2);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: rgba(250, 250, 250, 0.6);
}

.footer-sub {
    font-size: 0.75rem;
    color: rgba(250, 250, 250, 0.5);
    margin-top: 0.5rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

/* ============================================
   Connect Wallet Page
   ============================================ */
.dark-page {
    background: linear-gradient(to bottom right, #0a0a0f, #1a1a2e, #0a0a0f);
    min-height: 100vh;
}

.connect-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.connect-container {
    width: 100%;
    max-width: 42rem;
    background-color: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 1rem;
    border: 1px solid #2a2a3e;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.connect-header {
    position: relative;
    border-bottom: 1px solid #2a2a3e;
    padding: 1.5rem;
}

.close-btn {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    color: #a0a0b0;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.close-btn:hover {
    color: #fff;
    background-color: #2a2a3e;
}

.connect-header-text {
    text-align: center;
    padding-right: 3rem;
}

.connect-subtitle {
    color: var(--secondary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.connect-header-text h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.connect-description {
    color: #d1d5db;
    font-size: 1.125rem;
    line-height: 1.6;
}

.wallet-list {
    padding: 1.5rem;
    max-height: 500px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wallet-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: rgba(42, 42, 62, 0.5);
    border: 1px solid #3a3a4e;
    border-radius: 0.75rem;
    transition: all 0.2s;
}

.wallet-item:hover {
    background-color: #2a2a3e;
    border-color: var(--secondary);
}

.wallet-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    background-color: #3a3a4e;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wallet-icon img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

.wallet-name {
    flex: 1;
    text-align: left;
    color: #fff;
    font-weight: 500;
    font-size: 1.125rem;
}

.wallet-arrow {
    color: #a0a0b0;
    transition: color 0.2s;
}

.wallet-item:hover .wallet-arrow {
    color: var(--secondary);
}

.connect-footer {
    border-top: 1px solid #2a2a3e;
    padding: 1.5rem;
    background-color: rgba(10, 10, 15, 0.5);
}

.connect-footer p {
    font-size: 0.875rem;
    color: #a0a0b0;
    text-align: center;
}

/* ============================================
   Wallet Details Page
   ============================================ */
.wallet-details-page {
    min-height: 100vh;
    padding: 3rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wallet-details-container {
    width: 100%;
    max-width: 48rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #d1d5db;
    margin-bottom: 2rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: #fff;
}

.wallet-form-card {
    background-color: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid #2a2a3e;
}

.wallet-form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.wallet-form-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

.wallet-form-header p {
    color: #d1d5db;
    font-size: 1.125rem;
}

.wallet-highlight {
    color: var(--secondary);
    font-weight: 600;
}

.wallet-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.wallet-form .form-group label {
    color: #fff;
    font-size: 1.125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.wallet-form .form-group input,
.wallet-form .form-group textarea {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
    font-size: 1rem;
    padding: 1rem;
}

.wallet-form .form-group input {
    height: 3.5rem;
}

.wallet-form .form-group textarea {
    min-height: 8rem;
    resize: none;
}

.wallet-form .form-group input::placeholder,
.wallet-form .form-group textarea::placeholder {
    color: #94a3b8;
}

.error-message {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.5);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    color: #f87171;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    animation: spin 1s linear infinite;
}

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

.wallet-form-note {
    color: #a0a0b0;
    font-size: 0.875rem;
    text-align: center;
    margin-top: 1.5rem;
}

/* Success Page */
.success-container {
    width: 100%;
    max-width: 42rem;
    background-color: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    border: 1px solid #2a2a3e;
}

.success-icon {
    width: 4rem;
    height: 4rem;
    background-color: rgba(20, 184, 166, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.success-icon svg {
    color: #2dd4bf;
}

.success-container h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

.success-container p {
    color: #d1d5db;
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.redirect-text {
    color: #a0a0b0 !important;
    font-size: 1rem !important;
}

@media (min-width: 768px) {
    .wallet-form-card {
        padding: 3rem;
    }
    
    .wallet-form-header h1 {
        font-size: 2rem;
    }
}

/* ============================================
   Scrollbar Styles
   ============================================ */
.wallet-list::-webkit-scrollbar {
    width: 6px;
}

.wallet-list::-webkit-scrollbar-track {
    background: #1a1a2e;
    border-radius: 3px;
}

.wallet-list::-webkit-scrollbar-thumb {
    background: #3a3a4e;
    border-radius: 3px;
}

.wallet-list::-webkit-scrollbar-thumb:hover {
    background: #4a4a5e;
}
