/* Dark Theme - Inspired by othman.ai */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark theme colors inspired by othman.ai */
    --background: #0a0a0a;
    --surface: #111111;
    --surface-light: #1a1a1a;
    --border: #262626;
    --border-light: #333333;
    
    /* Text colors */
    --text-primary: #e5e5e5;
    --text-secondary: #a3a3a3;
    --text-muted: #737373;
    
    /* Accent colors - subtle green for carbon theme */
    --accent-primary: #22c55e;
    --accent-secondary: #16a34a;
    --accent-dim: #15803d;
    --accent-glow: rgba(34, 197, 94, 0.2);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    --gradient-accent: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    --gradient-hero: linear-gradient(180deg, rgba(10,10,10,0) 0%, rgba(10,10,10,1) 100%);
    
    /* Effects */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(34, 197, 94, 0.1);
}

/* Base Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Header */
header {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--accent-primary);
}

/* Hero Section */
.hero {
    background: var(--background);
    padding: 6rem 20px 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

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

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--accent-primary);
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Calculator Section */
.calculator-section {
    padding: 4rem 20px;
    background: var(--background);
}

.calculator-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    text-align: center;
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.subtitle-main {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 0.5rem;
    animation: pulse 2s ease-in-out infinite;
}

.subtitle-sub {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
    display: block;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.calculator-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.radio-group {
    display: flex;
    gap: 1rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.radio-label input[type="radio"] {
    width: auto;
}

input[type="range"] {
    width: 100%;
    background: transparent;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-track {
    width: 100%;
    height: 6px;
    background: var(--surface-light);
    border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    margin-top: -5px;
}

.range-value {
    display: inline-block;
    margin-left: 1rem;
    font-weight: 500;
    color: var(--accent-primary);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary span {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* Calculator Preview */
.calculator-preview {
    background: var(--surface-light);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.calculator-preview h3 {
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.preview-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preview-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--background);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.preview-stat .label {
    color: var(--text-muted);
}

.preview-stat .value {
    font-weight: 600;
    color: var(--accent-primary);
    font-variant-numeric: tabular-nums;
}

/* Devices Section */
.devices-section {
    padding: 4rem 20px;
    background: var(--surface);
}

.devices-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.device-card {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    transition: all 0.2s;
}

.device-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

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

.device-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.device-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.device-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
}

.device-stat {
    display: flex;
    flex-direction: column;
}

.device-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.device-stat-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.remove-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s;
}

.device-card:hover .remove-btn {
    opacity: 1;
}

.remove-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* Insights Section */
.insights-section {
    padding: 4rem 20px;
    background: var(--background);
}

.insights-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.insight-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.insight-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.insight-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: grayscale(0.3);
}

.insight-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-primary);
    font-variant-numeric: tabular-nums;
}

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

/* World Map Section */
.map-section {
    padding: 4rem 20px;
    background: var(--background);
    position: relative;
    overflow: hidden;
}

.map-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0.3;
}

.map-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.world-map {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.map-svg {
    width: 100%;
    height: auto;
    display: block;
}

.map-ping {
    fill: var(--accent-primary);
    stroke: var(--accent-primary);
    stroke-width: 2;
    filter: drop-shadow(0 0 10px var(--accent-primary));
}

.map-label {
    fill: var(--text-secondary);
    font-size: 12px;
    text-anchor: middle;
}

.map-connection {
    stroke: var(--accent-primary);
    stroke-width: 1;
    opacity: 0.3;
    stroke-dasharray: 5, 5;
    stroke-dashoffset: 0;
}

.map-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
    border: 1px solid var(--border-light);
}

.legend-dot.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* About Section */
.about-section {
    padding: 4rem 20px;
    background: var(--surface);
}

.about-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-item h4 {
    margin-bottom: 0.5rem;
    color: var(--accent-primary);
}

.info-item p {
    color: var(--text-secondary);
}

/* Footer */
footer {
    background: var(--background);
    color: var(--text-muted);
    text-align: center;
    padding: 2rem 20px;
    border-top: 1px solid var(--border);
}

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

.hero-content,
.calculator-card,
.device-card,
.insight-card {
    animation: fadeIn 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .calculator-card {
        grid-template-columns: 1fr;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }
    
    .logo {
        gap: 1.5rem;
    }
    
    .nav-links {
        gap: 2rem;
    }
}