@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg: #0a0b10;
    --cyan: #00f2ff;
    --purple: #7000ff;
    --text: #ffffff;
    --text-muted: #9ca3af;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.1);
    --border-bright: rgba(0, 242, 255, 0.3);
    --glow-cyan: rgba(0, 242, 255, 0.4);
    --glow-purple: rgba(112, 0, 255, 0.4);
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

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

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

.section {
    padding: 8rem 0;
}

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

/* Bento Grid System */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(100px, auto);
    gap: 1.5rem;
}

/* Cards & Glassmorphism */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 24px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.glass::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px; /* Border thickness */
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.2), rgba(112, 0, 255, 0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

.glass:hover {
    transform: translateY(-5px);
    background: var(--card-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 242, 255, 0.05);
}

.glass:hover::before {
    opacity: 1;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    color: #000;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 242, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 255, 0.5);
}

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

.btn-secondary:hover {
    border-color: var(--cyan);
    background: rgba(0, 242, 255, 0.05);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--cyan);
    background: rgba(0, 242, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}

#feedback-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    display: none;
}

#feedback-message.success {
    display: block !important;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

#feedback-message.error {
    display: block !important;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th {
    text-align: left;
    padding: 1.5rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.comparison-table td {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

@media (max-width: 768px) {
    .comparison-table thead {
        display: none;
    }
    
    .comparison-table tr {
        display: block;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border);
    }
    
    .comparison-table td {
        display: flex;
        justify-content: space-between;
        padding: 0.75rem 0;
        border: none;
        text-align: right;
    }
    
    .comparison-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-muted);
        text-align: left;
    }
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 242, 255, 0.1);
    color: var(--cyan);
    border: 1px solid var(--border-bright);
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Gradients */
.text-gradient {
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease forwards;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .glass {
        grid-column: span 1 !important;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }
    
    nav .nav-links {
        display: none !important;
    }
    
    h1 {
        font-size: 2.5rem !important;
    }
}

/* Global Grid Fix for Bento */
.bento-grid > div {
    grid-column: span 12;
}

@media (min-width: 1025px) {
    .bento-grid {
        grid-template-columns: repeat(12, 1fr);
    }
    /* Restoration of specific spans only for desktop */
    #sandbox .bento-grid > div:nth-child(2),
    #sandbox .bento-grid > div:nth-child(3) {
        grid-column: span 6;
    }
}
