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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
}

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

header {
    padding: 20px 0;
    border-bottom: 1px solid #333;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: #00ff88;
    text-decoration: none;
}

.hero {
    padding: 80px 0 120px;
    text-align: center;
    background: radial-gradient(ellipse at center, rgba(0, 255, 136, 0.1) 0%, transparent 70%);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #ffffff 0%, #00ff88 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 50px;
    color: #b0b0b0;
    line-height: 1.8;
}

.start-test-btn {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #000000;
    border: none;
    padding: 18px 40px;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
}

.start-test-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.4);
    background: linear-gradient(135deg, #00ff88 0%, #00e676 100%);
}

.start-test-btn:active {
    transform: translateY(0);
}

.test-interface {
    margin-top: 30px;
}

.test-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 25px;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.stat-label {
    color: #00ff88;
    font-weight: 600;
    margin-right: 8px;
}

.stop-test-btn {
    background: linear-gradient(135deg, #ff4444 0%, #cc3333 100%);
    color: #ffffff;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stop-test-btn:hover {
    background: linear-gradient(135deg, #ff5555 0%, #dd4444 100%);
    transform: translateY(-1px);
}

#test-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    background: #000;
}

/* Test Monitoring Interface */
.test-monitoring {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.monitoring-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    width: 350px;
    height: 100vh;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(0, 255, 136, 0.3);
    padding: 20px;
    overflow-y: auto;
    pointer-events: all;
    color: #ffffff;
}

.monitoring-header {
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.monitoring-header h3 {
    color: #00ff88;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

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

.status-indicator {
    width: 10px;
    height: 10px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

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

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #b0b0b0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00cc6a);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: background 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: #00ff88;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: #b0b0b0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.chart-section h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

.chart-container {
    height: 150px;
    position: relative;
}

.system-info {
    margin-bottom: 25px;
}

.system-info h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

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

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: #b0b0b0;
    font-size: 0.9rem;
}

.info-item span:last-child {
    color: #ffffff;
    font-size: 0.9rem;
    text-align: right;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.control-section {
    margin-top: auto;
}

.control-section .stop-test-btn {
    width: 100%;
    margin: 0;
}

/* Level Selection Interface */
.level-selection {
    padding: 60px 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    min-height: 100vh;
}

.level-selection h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #00ff88;
    margin-bottom: 15px;
}

.level-selection p {
    text-align: center;
    font-size: 1.2rem;
    color: #b0b0b0;
    margin-bottom: 50px;
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.level-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px 25px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.level-card:hover {
    border-color: rgba(0, 255, 136, 0.5);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
}

.level-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.level-card h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.level-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.level-stats span {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.level-card p {
    color: #b0b0b0;
    margin-bottom: 25px;
    line-height: 1.5;
}

.level-btn {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #000000;
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.level-btn:hover {
    background: linear-gradient(135deg, #00e676 0%, #00b356 100%);
    transform: translateY(-1px);
}

.back-btn {
    display: block;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Test Results Page */
.test-results {
    padding: 60px 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    min-height: 100vh;
}

.results-header {
    text-align: center;
    margin-bottom: 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 30px;
}

.results-header h2 {
    font-size: 2.5rem;
    color: #00ff88;
    margin-bottom: 10px;
}

.test-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.test-info span {
    color: #b0b0b0;
    font-size: 1.1rem;
}

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

.score-circle {
    width: 150px;
    height: 150px;
    background: conic-gradient(from 0deg, #00ff88 0%, #00cc6a 100%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: #0a0a0a;
    border-radius: 50%;
    z-index: 1;
}

.score-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #00ff88;
    z-index: 2;
}

.score-label {
    font-size: 1rem;
    color: #b0b0b0;
    z-index: 2;
}

.score-rating {
    font-size: 1.5rem;
    font-weight: 600;
    color: #00ff88;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.result-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: background 0.3s ease;
}

.result-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.result-value {
    font-size: 1.8rem;
    font-weight: 600;
    color: #00ff88;
    margin-bottom: 5px;
}

.result-label {
    font-size: 0.9rem;
    color: #b0b0b0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.results-comparison {
    margin-bottom: 40px;
}

.results-comparison h4 {
    color: #ffffff;
    font-size: 1.3rem;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.comparison-list {
    max-height: 200px;
    overflow-y: auto;
}

.comparison-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 10px;
    color: #b0b0b0;
}

.comparison-item:last-child {
    margin-bottom: 0;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.test-again-btn {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #000000;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.test-again-btn:hover {
    background: linear-gradient(135deg, #00e676 0%, #00b356 100%);
    transform: translateY(-1px);
}

.new-level-btn, .home-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.new-level-btn:hover, .home-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Header Navigation */
.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo a {
    color: #00ff88;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.share-btn {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #000000 !important;
    font-weight: 600;
}

/* Ad Placeholders */
.ad-banner {
    margin: 30px 0;
    text-align: center;
}

.ad-hero {
    max-width: 728px;
    margin: 20px auto;
}

.ad-horizontal {
    max-width: 970px;
    margin: 0 auto;
}

.ad-sidebar {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 160px;
    z-index: 500;
}

.ad-placeholder {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    padding: 60px 20px;
    border-radius: 8px;
    color: #666;
    font-size: 0.9rem;
}

.ad-section {
    padding: 20px 0;
}

/* Social Sharing */
.social-share {
    margin-top: 30px;
    text-align: center;
}

.social-share h3 {
    color: #00ff88;
    margin-bottom: 20px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.share-buttons .share-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-buttons .twitter:hover {
    background: #1da1f2;
    border-color: #1da1f2;
}

.share-buttons .facebook:hover {
    background: #4267b2;
    border-color: #4267b2;
}

.share-buttons .linkedin:hover {
    background: #0077b5;
    border-color: #0077b5;
}

.share-buttons .copy:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.02);
}

.about-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #00ff88;
    margin-bottom: 30px;
}

.about-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #b0b0b0;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.about-feature {
    text-align: center;
    padding: 30px 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.about-feature h4 {
    color: #ffffff;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

/* How It Works */
.how-it-works {
    padding: 80px 0;
}

.how-it-works h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #00ff88;
    margin-bottom: 50px;
}

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

.step-item {
    text-align: center;
    padding: 30px 20px;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step-item h4 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.step-item p {
    color: #b0b0b0;
    line-height: 1.6;
}

/* Footer */
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section h4 {
    color: #00ff88;
    margin-bottom: 15px;
}

.footer-section p {
    color: #b0b0b0;
    line-height: 1.6;
}

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

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #b0b0b0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #00ff88;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
}

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 255, 136, 0.3);
    padding: 20px;
    z-index: 10000;
    display: none;
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-content p {
    color: #b0b0b0;
    margin: 0;
}

.cookie-content a {
    color: #00ff88;
    text-decoration: none;
}

.cookie-buttons {
    display: flex;
    gap: 15px;
}

.cookie-accept, .cookie-decline {
    padding: 8px 20px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cookie-accept {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #000000;
}

.cookie-decline {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-accept:hover {
    background: linear-gradient(135deg, #00e676 0%, #00b356 100%);
}

.cookie-decline:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* WebGL Error Display */
.webgl-error {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.error-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a1a1a 100%);
    border: 2px solid #ff4444;
    border-radius: 15px;
    padding: 40px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(255, 68, 68, 0.3);
}

.error-content h3 {
    color: #ff4444;
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.error-content p {
    color: #ffffff;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1rem;
}

.error-content details {
    margin: 15px 0;
    color: #b0b0b0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.error-content summary {
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 600;
    color: #00ff88;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    outline: none;
    transition: background 0.3s ease;
}

.error-content summary:hover {
    background: rgba(0, 255, 136, 0.1);
}

.error-content details[open] summary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.error-content details div,
.error-content details p,
.error-content details ul {
    padding: 16px;
    margin: 0;
}

.error-content details ul {
    list-style-type: disc;
    padding-left: 40px;
}

.error-content details li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.retry-btn, .close-btn, .reload-btn {
    padding: 12px 25px;
    border-radius: 25px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.retry-btn {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #000000;
}

.retry-btn:hover {
    background: linear-gradient(135deg, #00e676 0%, #00b356 100%);
    transform: translateY(-1px);
}

.reload-btn {
    background: linear-gradient(135deg, #4444ff 0%, #3333cc 100%);
    color: #ffffff;
}

.reload-btn:hover {
    background: linear-gradient(135deg, #5555ff 0%, #4444dd 100%);
    transform: translateY(-1px);
}

.close-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Mobile error display */
@media (max-width: 768px) {
    .error-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .error-content h3 {
        font-size: 1.3rem;
    }
    
    .error-actions {
        flex-direction: column;
    }
    
    .retry-btn, .close-btn, .reload-btn {
        width: 100%;
    }
}

.features {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.02);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.feature-item {
    text-align: center;
    padding: 40px 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, background 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #00ff88;
}

.feature-item p {
    color: #b0b0b0;
}

footer {
    padding: 40px 0;
    border-top: 1px solid #333;
    text-align: center;
    margin-top: auto;
}

footer p {
    color: #666;
}

/* Mobile Layout */
@media (max-width: 768px) {
    .hero {
        padding: 60px 0 80px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
        margin-bottom: 40px;
    }
    
    .start-test-btn {
        padding: 16px 35px;
        font-size: 1.2rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .feature-item {
        padding: 30px 25px;
    }
    
    /* Mobile monitoring panel - bottom instead of sidebar */
    .monitoring-sidebar {
        position: absolute;
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 40vh;
        border-left: none;
        border-top: 1px solid rgba(0, 255, 136, 0.3);
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .stat-card {
        padding: 10px 5px;
    }
    
    .stat-value {
        font-size: 1.1rem;
        margin-bottom: 3px;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .chart-container {
        height: 100px;
    }
    
    .system-info, .chart-section {
        display: none; /* Hide on mobile to save space */
    }
    
    .monitoring-header h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .progress-section {
        margin-bottom: 15px;
    }
    
    /* Mobile styles for level selection */
    .level-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .level-card {
        padding: 25px 20px;
    }
    
    .level-selection h2 {
        font-size: 2rem;
    }
    
    /* Mobile navigation */
    .header-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        gap: 15px;
    }
    
    /* Mobile ad adjustments */
    .ad-sidebar {
        display: none;
    }
    
    .ad-placeholder {
        padding: 40px 15px;
    }
    
    /* Mobile sharing buttons */
    .share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .share-buttons .share-btn {
        width: 200px;
        justify-content: center;
    }
    
    /* Mobile footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* Mobile cookie consent */
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    /* Mobile styles for results */
    .results-header h2 {
        font-size: 2rem;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .result-card {
        padding: 15px;
    }
    
    .result-value {
        font-size: 1.4rem;
    }
    
    .score-circle {
        width: 120px;
        height: 120px;
    }
    
    .score-circle::before {
        width: 100px;
        height: 100px;
    }
    
    .score-value {
        font-size: 2rem;
    }
    
    .results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .test-again-btn, .new-level-btn, .home-btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .start-test-btn {
        padding: 14px 30px;
        font-size: 1.1rem;
    }
}

/* 2D Fallback Animations */
@keyframes fallbackSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fallbackMove {
    0% { transform: translateX(-10px) translateY(-5px); }
    50% { transform: translateX(10px) translateY(5px) scale(1.1); }
    100% { transform: translateX(-10px) translateY(-5px); }
}

/* Force visibility for level selection when shown */
.level-selection[style*="display: block"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1000 !important;
}

/* Ensure hero is properly hidden when needed */
.hero[style*="display: none"] {
    display: none !important;
}

/* Hide about section when level selection is active */
.level-selection[style*="display: block"] ~ * .about-section,
.about-section[style*="display: none"] {
    display: none !important;
    visibility: hidden !important;
}

/* Prevent any scrolling to about section */
.about-section {
    scroll-margin-top: 0;
}

/* Force level selection to top when active */
.level-selection[style*="display: block"] {
    margin-top: 0 !important;
    padding-top: 50px !important;
}