/* Base Styles */
:root {
    --primary-color: #6c5ce7;
    --primary-dark: #5649c0;
    --secondary-color: #00cec9;
    --accent-color: #fd79a8;
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #2d2d2d;
    --card-bg: #252525;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --error-color: #d63031;
    --border-radius: 12px;
    --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

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

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Layout */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.logo h1 span {
    color: var(--primary-color);
}

.logo-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.main-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
}

.main-nav a.active {
    color: var(--text-primary);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
}

.theme-toggle:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.2);
}

.sun {
    display: none;
}

.main-content {
    margin-top: 80px;
    padding: 40px 0;
}

/* Hero Section */
.hero-section {
    padding: 80px 0;
    position: relative;
}

.hero-section .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-title span {
    color: var(--primary-color);
    position: relative;
}

.hero-title span::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: var(--primary-color);
    opacity: 0.3;
    z-index: -1;
    border-radius: 4px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.btn-start-test {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-start-test:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}

.btn-start-test .btn-arrow {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-start-test .btn-arrow svg {
    width: 100%;
    height: 100%;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.speed-dial-container {
    position: relative;
    width: 300px;
    height: 300px;
}

.speed-dial {
    width: 100%;
    height: 100%;
    background-color: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--box-shadow);
    border: 10px solid var(--bg-secondary);
}

.dial-face {
    width: 90%;
    height: 90%;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        var(--error-color) 0%,
        var(--warning-color) 50%,
        var(--success-color) 100%
    );
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dial-face::before {
    content: '';
    position: absolute;
    width: 85%;
    height: 85%;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
}

.needle {
    position: absolute;
    width: 2px;
    height: 45%;
    background-color: var(--text-primary);
    bottom: 50%;
    transform-origin: bottom center;
    transform: rotate(-90deg);
    z-index: 2;
    transition: transform 1s ease-out;
}

.needle::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--text-primary);
}

.dial-value {
    position: absolute;
    font-size: 3rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    z-index: 3;
}

.dial-unit {
    position: absolute;
    bottom: 30%;
    font-size: 1.2rem;
    color: var(--text-secondary);
    z-index: 3;
}

/* Test Section */
.test-section {
    padding: 60px 0;
}

.test-progress {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--box-shadow);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 30px;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--bg-tertiary);
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 10px;
    transition: var(--transition);
}

.step.active .step-icon {
    background-color: var(--primary-color);
    color: white;
}

.step-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.step.active .step-name {
    color: var(--text-primary);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.test-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.result-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 1.2rem;
}

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

.card-value {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 5px;
}

.card-unit {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.card-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.test-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.detail-card, .history-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
}

.detail-card h3, .history-card h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-item span:first-child {
    color: var(--text-secondary);
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.history-item-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.history-item-values {
    display: flex;
    gap: 15px;
}

.history-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.empty-history {
    text-align: center;
    padding: 30px 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* Info Section */
.info-section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.info-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.info-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.info-card h3 {
    margin-bottom: 15px;
}

.info-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Footer */
.main-footer {
    background-color: var(--bg-secondary);
    padding: 60px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo h3 {
    font-size: 1.5rem;
}

.footer-logo h3 span {
    color: var(--primary-color);
}

.footer-links ul {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.footer-social {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Particles Background */
.particles-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: var(--bg-primary);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-section .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .test-results, .info-cards {
        grid-template-columns: 1fr;
    }
    
    .test-details {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-social {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .progress-steps {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .step {
        width: calc(50% - 10px);
    }
    
    .progress-steps::before {
        display: none;
    }
}