:root {
    --primary-red: #ff4d4d;
    --text-white: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.6);
    --glass-bg: rgba(0, 0, 0, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-glow: rgba(255, 77, 77, 0.4);
}

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-white);
    background: #050000;
    background-image: radial-gradient(ellipse at center, #1a0800 0%, #000 100%);
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
    width: 100vw;
}

#bg-video {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    z-index: -2;
    object-fit: cover;
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.8) 100%);
    z-index: -1;
}

#particles {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
}

#cursor-canvas {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
}

/* UI Controls */
.ui-controls {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

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

.control-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

#particle-toggle, #music-toggle {
    font-size: 0.85rem;
}

#music-toggle.playing {
    color: #1db954;
    animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
    0%, 100% { box-shadow: 0 0 0 0 rgba(29, 185, 84, 0.4); }
    50% { box-shadow: 0 0 8px 4px rgba(29, 185, 84, 0.15); }
}

.now-playing {
    position: fixed;
    top: 70px;
    left: 20px;
    z-index: 100;
    font-size: 0.75rem;
    color: var(--text-dim);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: fadeIn 0.3s ease-out;
}

#lang-btn {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    min-width: 40px;
}

/* Container */
.container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1;
    text-align: center;
    padding: 100px 20px 200px;
}

.content-wrapper {
    animation: fadeIn 1.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.profile-header {
    margin-bottom: 30px;
}

.header-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px var(--primary-red));
}

.name {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -2px;
    text-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-dim);
    font-weight: 300;
    margin-top: 5px;
    min-height: 1.4em;
}

.cursor {
    color: var(--primary-red);
    animation: blink 0.7s infinite;
    will-change: opacity;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Status Dot */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Discord Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 15px 25px;
    margin: 20px auto;
    display: inline-block;
    min-width: 250px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.discord-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.discord-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.discord-info {
    text-align: left;
}

#discord-status {
    font-weight: 600;
    font-size: 0.9rem;
}

#discord-activity {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Social Icons */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 30px;
}

.social-icons a {
    color: white;
    font-size: 1.8rem;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.social-icons a:hover {
    color: var(--primary-red);
    transform: translateY(-5px);
    opacity: 1;
    filter: drop-shadow(0 0 8px var(--primary-red));
}

/* Contact */
.contact {
    margin-top: 20px;
}

.contact-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.contact-link:hover {
    color: var(--primary-red);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

/* Projects Section */
.projects-section {
    width: 100%;
    max-width: 600px;
    margin-top: 50px;
    animation: fadeIn 1.5s ease-out;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    opacity: 0.8;
}

.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px 20px;
    text-align: left;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-white);
    display: block;
}

.project-card:hover {
    border-color: var(--primary-red);
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--accent-glow);
}

.project-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.project-card p {
    font-size: 0.8rem;
    color: var(--text-dim);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card .project-meta {
    display: flex;
    gap: 15px;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.project-card .project-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Skills Section */
.skills-section {
    width: 100%;
    max-width: 500px;
    margin-top: 50px;
    animation: fadeIn 1.5s ease-out;
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.skill-item {
    text-align: left;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.skill-name i {
    width: 18px;
    margin-right: 6px;
}

.skill-pct {
    color: #00d4ff;
    font-weight: 600;
    font-size: 0.85rem;
}

.skill-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00d4ff, #7b2ff7);
    border-radius: 3px;
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
    will-change: width;
}

.skills-section.visible .skill-fill {
    width: attr(data-width);
}

.projects-section {
    padding-bottom: 60px;
}

/* Visitor Count */
.visitor-count {
    margin-top: 40px;
    font-size: 0.8rem;
    opacity: 0.5;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .video-overlay {
        background: radial-gradient(circle, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
    }
    .name { font-size: 2.5rem; }
    .tagline { font-size: 1rem; }
    .header-icon { width: 50px; height: 50px; }
    .glass-card { min-width: 0; width: 100%; max-width: 320px; padding: 12px 18px; }
    .discord-avatar { width: 36px; height: 36px; }
    #discord-status { font-size: 0.85rem; }
    #discord-activity { font-size: 0.75rem; }

    .ui-controls { top: 12px; left: 12px; }
    .control-btn { padding: 8px 10px; min-width: 36px; min-height: 36px; font-size: 0.75rem; }

    .container { padding: 80px 15px 80px; }
    .skills-section { max-width: 100%; padding: 0 5px; margin-top: 35px; }
    .skills-grid { gap: 14px; }
    .skill-header { font-size: 0.85rem; }
    .skill-bar { height: 5px; }
    .projects-section { max-width: 100%; padding: 0 5px; }
    .project-card { padding: 12px 16px; }
    .project-card h3 { font-size: 0.9rem; }
    .project-card p { font-size: 0.75rem; }

    .social-icons { gap: 20px; margin-top: 25px; }
    .social-icons a { font-size: 1.5rem; }
    .contact { margin-top: 15px; }
    .contact-link { font-size: 0.8rem; }

    .section-title { font-size: 1.3rem; margin-bottom: 16px; }
    .visitor-count { margin-top: 30px; font-size: 0.75rem; }
    #cursor-canvas { display: none; }
}

@media (max-width: 480px) {
    .name { font-size: 2rem; }
    .container { padding: 70px 12px 60px; }
    .glass-card { max-width: 280px; }
}

.hidden { display: none !important; }
