/* 16C.co - Modern CSS Styles */

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --accent: #00d9ff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #9ca3af;
    
    --border: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.1);
    
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --gradient-accent-start: #f093fb;
    --gradient-accent-end: #f5576c;
    
    --radius: 1rem;
    --radius-small: 0.5rem;
    --radius-large: 1.5rem;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-tertiary: #9ca3af;
    
    --border: #374151;
    --shadow: rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

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

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

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

[data-theme="dark"] .navbar {
    background: rgba(17, 24, 39, 0.8);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.logo-text {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-menu {
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--bg-secondary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    font-family: var(--font-sans);
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

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

.btn-secondary:hover {
    background: var(--bg-secondary);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--bg-secondary);
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-top: 4rem;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.gradient-mesh {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(at 40% 20%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(at 80% 0%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(at 0% 50%, rgba(255, 219, 120, 0.3) 0%, transparent 50%),
        radial-gradient(at 80% 50%, rgba(120, 219, 255, 0.3) 0%, transparent 50%),
        radial-gradient(at 0% 100%, rgba(255, 120, 219, 0.3) 0%, transparent 50%);
    opacity: 0.6;
    animation: gradient-shift 15s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: #764ba2;
    top: 10%;
    left: 5%;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: #facc15;
    top: 30%;
    right: 10%;
    animation-delay: 2s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: #f472b6;
    bottom: -10%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.badge-dot {
    width: 0.5rem;
    height: 0.5rem;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 42rem;
    margin: 0 auto 3rem;
}

.text-primary {
    color: var(--primary);
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 48rem;
    margin: 0 auto 3rem;
}

.stat-card {
    padding: 1.5rem;
    border-radius: 1rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

.scroll-indicator {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
}

[data-theme="dark"] .glass {
    background: rgba(17, 24, 39, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

.glass-hover {
    transition: all 0.3s ease;
}

.glass-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.25);
}

/* Sections */
.section {
    padding: 5rem 0;
}

.bg-gray {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 42rem;
    margin: 0 auto;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.category-card {
    padding: 1.5rem;
    border-radius: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px var(--shadow);
}

.category-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.gradient-bg {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
}

.category-name {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.category-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.category-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category-count {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.category-arrow {
    color: var(--text-tertiary);
    transition: transform 0.3s ease;
}

.category-card:hover .category-arrow {
    transform: translateX(4px);
    color: var(--primary);
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.tool-card {
    padding: 1.5rem;
    border-radius: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.tool-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.tool-logo {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    object-fit: cover;
}

.tool-badge {
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
}

.tool-name {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.tool-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.tool-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tool-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Calculator */
.calculator-card {
    max-width: 48rem;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 1.5rem;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.calculator-input label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.calculator-input input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
}

.calculator-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.result-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 1rem;
}

.result-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
}

.cta-card {
    text-align: center;
    padding: 3rem;
    border-radius: 1.5rem;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 3rem 0 1.5rem;
    margin-top: 5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-tertiary);
}

/* 404 Page */
.not-found {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.not-found h1 {
    font-size: 6rem;
    margin-bottom: 1rem;
}

.not-found p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-actions > *:not(.mobile-menu-btn) {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .calculator-results {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
}

/* Utilities */
.card-modern {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.5s ease;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.card-modern:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}