/* Enhanced Typography Scale & Visual Hierarchy */
:root {
    /* Typography Scale */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */
    --text-5xl: 3rem;        /* 48px */
    
    /* Spacing Scale */
    --space-1: 0.25rem;      /* 4px */
    --space-2: 0.5rem;       /* 8px */
    --space-3: 0.75rem;      /* 12px */
    --space-4: 1rem;         /* 16px */
    --space-5: 1.25rem;      /* 20px */
    --space-6: 1.5rem;       /* 24px */
    --space-8: 2rem;         /* 32px */
    --space-10: 2.5rem;      /* 40px */
    --space-12: 3rem;        /* 48px */
    --space-16: 4rem;        /* 64px */
    --space-20: 5rem;        /* 80px */
    
    /* Zombie Theme Colors */
    --color-primary: #dc2626;
    --color-primary-light: rgba(220, 38, 38, 0.1);
    --color-secondary: #16a34a;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-text-primary: #ffffff;
    --color-text-secondary: #cbd5e1;
    --color-text-muted: #94a3b8;
    --color-text-subtle: #64748b;
    --color-bg-dark: #0f172a;
    --color-bg-darker: #020617;
}

/* Zombie Apocalypse Calculator Specific Styles */
.zombie-hero {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a0a 50%, #2a0a0a 100%);
    position: relative;
    overflow: hidden;
    min-height: 60vh;
}

.zombie-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><circle cx="100" cy="100" r="2" fill="%23dc2626" opacity="0.3"/><circle cx="300" cy="200" r="1.5" fill="%23ef4444" opacity="0.4"/><circle cx="500" cy="150" r="2.5" fill="%23dc2626" opacity="0.2"/><circle cx="700" cy="300" r="1.8" fill="%23ef4444" opacity="0.3"/><circle cx="200" cy="400" r="2" fill="%23dc2626" opacity="0.4"/><circle cx="800" cy="100" r="1.5" fill="%23ef4444" opacity="0.2"/><circle cx="600" cy="500" r="2.2" fill="%23dc2626" opacity="0.3"/><circle cx="400" cy="600" r="1.7" fill="%23ef4444" opacity="0.4"/><circle cx="900" cy="400" r="2" fill="%23dc2626" opacity="0.2"/><circle cx="150" cy="700" r="1.9" fill="%23ef4444" opacity="0.3"/></svg>') repeat;
    animation: bloodDrip 15s linear infinite;
}

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

.zombie-container {
    position: relative;
    z-index: 2;
}

.survival-control {
    background: rgba(15, 23, 42, 0.95);
    border: 2px solid #dc2626;
    border-radius: 16px;
    padding: var(--space-8);
    margin: var(--space-8) 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

/* Enhanced Section Headers */
.section-title-zombie {
    color: var(--color-primary);
    font-size: var(--text-3xl);
    font-weight: 700;
    margin-bottom: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    position: relative;
    text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

/* Hero subtitle styling for better contrast */
.hero-subtitle {
    color: white;
    font-size: var(--text-xl);
    font-weight: 400;
    margin-top: var(--space-4);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    opacity: 0.9;
}

/* Breadcrumb navigation styling */
.breadcrumb {
    color: #cbd5e1;
    font-size: var(--text-sm);
    margin-bottom: var(--space-6);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.breadcrumb a {
    color: #60a5fa;
    text-decoration: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.breadcrumb a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.section-title-zombie::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), transparent);
    margin-left: var(--space-4);
}

/* Mission Control Section Styling */
.mission-control {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid #475569;
    border-radius: 16px;
    padding: var(--space-8);
    margin: var(--space-8) 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.1);
}

.mission-control h2 {
    color: var(--color-primary);
    margin-bottom: var(--space-6);
}

.mission-control p {
    color: var(--color-text-primary);
    line-height: 1.6;
    margin-bottom: var(--space-4);
}

.mission-control h3 {
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

/* Stat Input Styles */
.stat-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.stat-card {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid #475569;
    border-radius: 12px;
    padding: var(--space-6);
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.2);
}

.stat-label {
    color: var(--color-text-primary);
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.stat-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #334155;
    outline: none;
    margin: var(--space-4) 0;
    -webkit-appearance: none;
}

.stat-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.stat-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.stat-value {
    color: var(--color-primary);
    font-size: var(--text-xl);
    font-weight: 700;
    text-align: center;
}

/* Stats Selection Cards */
.stats-category {
    margin-bottom: var(--space-6);
}

.stat-category-title {
    color: var(--color-text-primary);
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.stat-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-3);
}

.stat-option-card {
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid #475569;
    border-radius: 12px;
    padding: var(--space-4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
}

.stat-option-card:hover {
    border-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.2);
}

.stat-option-card.selected {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.25);
}

.stat-level {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-1);
}

.stat-description {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
    line-height: 1.4;
}

.stat-option-card .stat-value {
    font-size: var(--text-lg);
    font-weight: 700;
    color: #dc2626;
}

/* Contextual Help */
.contextual-help {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: var(--space-3);
    margin-bottom: var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.help-icon {
    color: #3b82f6;
    margin-right: var(--space-1);
}

.help-tooltip {
    cursor: help;
    color: #3b82f6;
    margin-left: var(--space-1);
    position: relative;
}

.help-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: var(--space-2);
    border-radius: 6px;
    font-size: var(--text-xs);
    white-space: nowrap;
    z-index: 1000;
    max-width: 200px;
    white-space: normal;
}

.section-hint {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
    font-style: italic;
}

/* Team Selection */
.team-section {
    background: rgba(30, 41, 59, 0.6);
    border-radius: 12px;
    padding: var(--space-6);
    margin: var(--space-6) 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.team-member {
    background: rgba(51, 65, 85, 0.8);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: var(--space-4);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.team-member:hover {
    border-color: var(--color-primary);
    background: rgba(220, 38, 38, 0.1);
}

.team-member.selected {
    border-color: var(--color-secondary);
    background: rgba(22, 163, 74, 0.2);
}

.team-member-icon {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-2);
}

.team-member-name {
    color: var(--color-text-primary);
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.team-member-skill {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

/* Calculate Button */
.calculate-btn {
    background: linear-gradient(135deg, var(--color-primary), #ef4444);
    color: white;
    border: none;
    border-radius: 12px;
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-xl);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin: var(--space-8) 0;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}

/* Results Panel */
.results-panel {
    background: rgba(15, 23, 42, 0.95);
    border: 2px solid var(--color-secondary);
    border-radius: 16px;
    padding: var(--space-8);
    margin: var(--space-8) 0;
    display: none;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(22, 163, 74, 0.3);
}

.survival-score {
    text-align: center;
    margin-bottom: var(--space-8);
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto var(--space-4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-4xl);
    font-weight: 900;
    color: white;
    position: relative;
}

.score-excellent { background: linear-gradient(135deg, #16a34a, #22c55e); }
.score-good { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.score-poor { background: linear-gradient(135deg, #dc2626, #ef4444); }

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
}

.result-card {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 8px;
    padding: var(--space-4);
    text-align: center;
}

.result-icon {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-2);
}

.result-value {
    color: var(--color-text-primary);
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-1);
}

.result-label {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

/* Share Button */
.share-results-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    border-radius: 8px;
    padding: var(--space-3) var(--space-6);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: var(--space-6);
}

.share-results-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .stat-group {
        grid-template-columns: 1fr;
    }
    
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .supplies-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
}

/* Premium Share Component Styles - Zombie Theme */
.share-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.share-container {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(239, 68, 68, 0.3);
    animation: slideIn 0.3s ease-out;
}

.share-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(239, 68, 68, 0.3);
}

.share-header h3 {
    color: var(--color-primary);
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.close-btn {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #ef4444;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

.share-content h4 {
    color: var(--color-text-primary);
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.results-summary {
    margin-bottom: 25px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.summary-item {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.summary-item:hover {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(15, 23, 42, 0.7);
}

.summary-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    flex-shrink: 0;
}

.summary-details {
    flex: 1;
}

.summary-label {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.summary-value {
    color: var(--color-text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.preview-section {
    margin-bottom: 25px;
}

.preview-content {
    background: rgba(15, 23, 42, 0.5);
    border: 2px dashed rgba(239, 68, 68, 0.3);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-placeholder {
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.placeholder-icon {
    font-size: 3rem;
    opacity: 0.7;
}

.preview-placeholder p {
    margin: 0;
    font-size: 1rem;
}

#shareCanvas {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.action-section {
    margin-bottom: 25px;
    text-align: center;
}

.capture-btn {
    background: linear-gradient(135deg, var(--color-primary) 0%, #dc2626 100%);
    border: none;
    color: white;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.capture-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.capture-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    font-size: 1.2rem;
}

.share-options {
    animation: slideIn 0.3s ease-out;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.share-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--color-text-primary);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.share-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

.share-btn.twitter:hover {
    background: rgba(29, 161, 242, 0.2);
    border-color: #1da1f2;
}

.share-btn.facebook:hover {
    background: rgba(24, 119, 242, 0.2);
    border-color: #1877f2;
}

.share-btn.linkedin:hover {
    background: rgba(10, 102, 194, 0.2);
    border-color: #0a66c2;
}

.share-btn.reddit:hover {
    background: rgba(255, 69, 0, 0.2);
    border-color: #ff4500;
}

.share-btn.email:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
}

.share-btn.download:hover {
    background: rgba(168, 85, 247, 0.2);
    border-color: #a855f7;
}

.share-icon {
    font-size: 1.1rem;
}

/* Share Component Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Share Component Responsive Design */
@media (max-width: 768px) {
    .share-container {
        padding: 20px;
        margin: 20px;
    }
    
    .share-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .share-header h3 {
        font-size: 1.3rem;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .share-buttons {
        grid-template-columns: 1fr;
    }
    
    .capture-btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
}