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

:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #00d9ff;
    --bg-dark: #0f0c29;
    --bg-mid: #302b63;
    --bg-light: #24243e;
    --text: #ffffff;
    --glow: rgba(0, 217, 255, 0.6);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-mid) 50%, var(--bg-light) 100%);
    color: var(--text);
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-mid) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-bar {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 20px auto;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--glow);
}

#loading-text {
    color: var(--accent);
    font-size: 14px;
    margin-top: 10px;
}

/* Intro Screen */
#intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#intro-screen.active {
    opacity: 1;
    pointer-events: all;
}

.intro-content {
    text-align: center;
    z-index: 2;
}

.glitch {
    font-size: 80px;
    font-weight: 900;
    letter-spacing: 10px;
    color: var(--text);
    position: relative;
    animation: glitch-animation 3s infinite;
}

@keyframes glitch-animation {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-before 0.3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    color: #00d9ff;
}

.glitch::after {
    animation: glitch-after 0.3s infinite;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    color: #ff00d9;
}

@keyframes glitch-before {
    0%, 100% { transform: translate(0); }
    33% { transform: translate(-2px, 0); }
    66% { transform: translate(2px, 0); }
}

@keyframes glitch-after {
    0%, 100% { transform: translate(0); }
    33% { transform: translate(2px, 0); }
    66% { transform: translate(-2px, 0); }
}

.intro-subtitle {
    font-size: 24px;
    color: var(--accent);
    margin: 20px 0 40px;
    letter-spacing: 3px;
}

.cyber-button {
    position: relative;
    padding: 20px 60px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    background: transparent;
    border: 2px solid var(--accent);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    letter-spacing: 2px;
}

.cyber-button:hover {
    background: var(--accent);
    box-shadow: 0 0 30px var(--glow);
    transform: scale(1.05);
}

.cyber-button span {
    position: relative;
    z-index: 2;
}

.cyber-button-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.cyber-button:hover .cyber-button-glow {
    width: 300px;
    height: 300px;
}

.intro-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

/* UI Overlay */
#ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

#ui-overlay > * {
    pointer-events: all;
}

/* Scroll Hint */
#scroll-hint {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 100;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

.scroll-icon {
    width: 30px;
    height: 50px;
    border: 2px solid var(--accent);
    border-radius: 20px;
    margin: 0 auto 10px;
    position: relative;
}

.scroll-wheel {
    width: 4px;
    height: 10px;
    background: var(--accent);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 1.5s infinite;
}

@keyframes scroll-wheel {
    0% { top: 8px; opacity: 1; }
    100% { top: 28px; opacity: 0; }
}

#scroll-hint p {
    color: var(--accent);
    font-size: 14px;
}

.fade-in {
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Zone Indicator */
#zone-indicator {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.zone-badge {
    background: rgba(15, 12, 41, 0.9);
    border: 2px solid var(--accent);
    border-radius: 30px;
    padding: 12px 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.3);
    backdrop-filter: blur(10px);
}

#zone-emoji {
    font-size: 24px;
}

#zone-name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent);
}

/* Progress Bar */
#progress-bar {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 100;
}

.progress-line {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--glow);
}

.progress-dots {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.dot:hover {
    transform: scale(1.2);
}

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

.dot::after {
    content: attr(title);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 12, 41, 0.95);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.dot:hover::after {
    opacity: 1;
}

/* Navigation */
#main-nav {
    position: fixed;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}

.nav-btn {
    background: rgba(15, 12, 41, 0.8);
    border: 2px solid rgba(0, 217, 255, 0.3);
    color: var(--text);
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 5px;
    backdrop-filter: blur(10px);
    letter-spacing: 1px;
}

.nav-btn:hover {
    background: rgba(0, 217, 255, 0.2);
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--glow);
    transform: translateX(5px);
}

/* Content Panel */
#content-panel {
    position: fixed;
    right: -450px;
    top: 50%;
    transform: translateY(-50%);
    width: 420px;
    max-height: 80vh;
    background: rgba(15, 12, 41, 0.95);
    border: 2px solid var(--accent);
    border-radius: 15px;
    padding: 30px;
    overflow-y: auto;
    z-index: 200;
    transition: right 0.4s ease;
    box-shadow: -5px 0 30px rgba(0, 217, 255, 0.3);
    backdrop-filter: blur(20px);
}

#content-panel.open {
    right: 30px;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.close-btn:hover {
    background: rgba(0, 217, 255, 0.2);
    transform: rotate(90deg);
}

#panel-content h2 {
    color: var(--accent);
    font-size: 28px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
}

#panel-content h3 {
    color: var(--accent);
    font-size: 20px;
    margin: 20px 0 10px;
}

#panel-content p {
    line-height: 1.6;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}

#panel-content ul {
    list-style: none;
    padding: 0;
}

#panel-content li {
    margin: 10px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--accent);
    border-radius: 5px;
}

/* Controls Info */
#controls-info {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(15, 12, 41, 0.9);
    border: 2px solid rgba(0, 217, 255, 0.3);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    z-index: 100;
    backdrop-filter: blur(10px);
}

/* Custom Scrollbar */
#content-panel::-webkit-scrollbar {
    width: 8px;
}

#content-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

#content-panel::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

#content-panel::-webkit-scrollbar-thumb:hover {
    background: #00b8d4;
}

/* Stat Cards */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.stat-card {
    background: rgba(0, 217, 255, 0.1);
    border: 2px solid var(--accent);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Experience Card */
.experience-card {
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--accent);
    padding: 20px;
    margin: 15px 0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.experience-card:hover {
    background: rgba(0, 217, 255, 0.1);
    transform: translateX(5px);
}

.experience-card h4 {
    color: var(--accent);
    font-size: 18px;
    margin-bottom: 5px;
}

.experience-company {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    margin-bottom: 5px;
}

.experience-period {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-bottom: 10px;
}

/* Project Card */
.project-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: var(--accent);
    box-shadow: 0 5px 20px rgba(0, 217, 255, 0.3);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.project-emoji {
    font-size: 32px;
}

.project-name {
    color: var(--accent);
    font-size: 20px;
    font-weight: 700;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.tag {
    background: rgba(0, 217, 255, 0.2);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    color: var(--accent);
    border: 1px solid var(--accent);
}

/* Skill Bar */
.skill-item {
    margin: 15px 0;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.skill-name {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.skill-level {
    color: var(--accent);
    font-weight: 700;
}

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

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--glow);
}

/* Contact Links */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 217, 255, 0.1);
    border: 2px solid var(--accent);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
}

.contact-link:hover {
    background: rgba(0, 217, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 217, 255, 0.4);
}

.contact-icon {
    font-size: 24px;
}

.contact-text {
    font-size: 16px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .glitch {
        font-size: 40px;
    }
    
    #main-nav {
        left: 15px;
        gap: 10px;
    }
    
    .nav-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    #content-panel {
        width: calc(100% - 30px);
        right: -100%;
    }
    
    #content-panel.open {
        right: 15px;
    }
    
    #progress-bar {
        right: 15px;
    }
    
    .stat-grid {
        grid-template-columns: 1fr;
    }
}
