* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-bg: #0f172a;
    --dark-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar {
    padding: 1.5rem 0;
    position: relative;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo svg {
    color: #667eea;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

.hero-section {
    background: var(--dark-bg);
    position: relative;
    overflow: hidden;
    padding-bottom: 4rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 4rem 20px;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.device-illustration svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(102, 126, 234, 0.3));
}

.info-section {
    padding: 5rem 0;
    background: linear-gradient(180deg, var(--dark-bg) 0%, var(--dark-card) 100%);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.info-card {
    background: var(--dark-card);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: #667eea;
}

.info-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
}

.info-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.info-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.calculator-section {
    padding: 5rem 0;
    background: var(--dark-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.calculator-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
}

.devices-panel,
.results-panel {
    background: var(--dark-card);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.devices-panel h3,
.results-panel h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.devices-table {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.table-header {
    display: grid;
    grid-template-columns: 2.5fr 0.8fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.table-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.table-body::-webkit-scrollbar {
    width: 6px;
}

.table-body::-webkit-scrollbar-track {
    background: var(--dark-bg);
    border-radius: 3px;
}

.table-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.table-body::-webkit-scrollbar-thumb:hover {
    background: #667eea;
}

.device-row {
    display: grid;
    grid-template-columns: 2.5fr 0.8fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    align-items: center;
    transition: all 0.2s ease;
}

.device-row:hover {
    background: rgba(102, 126, 234, 0.05);
}

.device-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.device-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.15);
    border-radius: 8px;
    color: #667eea;
    transition: all 0.3s ease;
}

.device-row:hover .device-icon {
    background: rgba(102, 126, 234, 0.25);
    transform: scale(1.05);
}

.device-icon svg {
    width: 20px;
    height: 20px;
}

.device-name {
    color: var(--text-primary);
    font-weight: 500;
}

.device-row input {
    width: 100%;
    padding: 0.5rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 1rem;
    text-align: center;
    transition: all 0.2s ease;
}

.device-row input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.radiation-percent,
.total-percent {
    text-align: center;
    color: var(--text-secondary);
    font-weight: 500;
}

.total-percent {
    color: #667eea;
    font-weight: 600;
}

.results-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.exposure-card {
    text-align: center;
}

.exposure-meter {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 2rem auto;
}

.circular-progress {
    transform: rotate(-90deg);
}

.progress-bg {
    fill: none;
    stroke: var(--dark-bg);
    stroke-width: 12;
}

.progress-bar {
    fill: none;
    stroke: url(#progressGradient);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 502.65;
    stroke-dashoffset: 502.65;
    transition: stroke-dashoffset 0.5s ease;
}

.exposure-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.exposure-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    margin: 1rem 0;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.exposure-status.warning {
    background: rgba(245, 158, 11, 0.1);
}

.exposure-status.warning .status-indicator {
    background: var(--warning-color);
}

.exposure-status.danger {
    background: rgba(239, 68, 68, 0.1);
}

.exposure-status.danger .status-indicator {
    background: var(--danger-color);
}

.threshold-info {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.advisory-card {
    background: rgba(102, 126, 234, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.advisory-card h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.advisory-content h5 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #667eea;
}

.advisory-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.tip-box {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--dark-card);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.tip-box svg {
    flex-shrink: 0;
    color: #667eea;
}

.tip-box p {
    margin: 0;
    font-size: 0.95rem;
}

.tips-section {
    padding: 5rem 0;
    background: var(--dark-card);
}

.tips-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.tip-card {
    background: var(--dark-bg);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-align: center;
}

.tip-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: var(--shadow-xl);
}

.tip-image {
    width: 100%;
    height: 150px;
    margin-bottom: 1.5rem;
}

.tip-image svg {
    width: 100%;
    height: 100%;
}

.tip-card h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tip-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer {
    background: var(--dark-bg);
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.disclaimer {
    margin-bottom: 2rem;
}

.disclaimer h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.disclaimer p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
}

.disclaimer a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.disclaimer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-image {
        order: -1;
    }

    .calculator-layout {
        grid-template-columns: 1fr;
    }

    .results-panel {
        position: static;
    }

    .table-header,
    .device-row {
        grid-template-columns: 2fr 0.6fr 0.8fr 0.8fr;
        font-size: 0.85rem;
    }

    .device-icon {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }

    .device-icon svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 640px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .table-header {
        display: none;
    }

    .device-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1.5rem 1rem;
    }

    .device-info {
        grid-column: 1;
        gap: 0.75rem;
    }

    .device-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .device-icon svg {
        width: 22px;
        height: 22px;
    }

    .device-name {
        font-size: 1.05rem;
    }

    .device-row input {
        grid-column: 1;
    }

    .radiation-percent,
    .total-percent {
        display: flex;
        justify-content: space-between;
        text-align: left;
    }

    .radiation-percent::before {
        content: 'Radiation %: ';
        color: var(--text-muted);
    }

    .total-percent::before {
        content: 'Total %: ';
        color: var(--text-muted);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
