/* Global Variables & Base */
:root {
    --bg-color: #050505;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.1);
    --primary: #8b5cf6;
    --secondary: #06b6d4;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --glow-spread: 120px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Space Grotesk', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Ensure all pages have enough content height for nav scroll effect */
.container {
    min-height: calc(100vh - 140px);
    padding-bottom: 100px;
}

/* Background Effects */
.background-fx {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.08), transparent 25%);
    filter: blur(60px);
    animation: pulseBackground 10s infinite alternate;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image:
        linear-gradient(var(--card-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--card-border) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
    opacity: 0.05;
    transform: perspective(500px) rotateX(60deg) scale(2);
    transform-origin: top center;
    animation: gridMove 20s linear infinite;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(15px);
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--card-border);
    transition: background 0.3s, padding 0.3s;
}

nav.scrolled {
    background: rgba(0, 0, 0, 0.5);
    padding: 15px 5%;
    border-bottom: 1px solid var(--primary);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -1px;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: 0.3s;
    position: relative;
    display: inline-block;
    padding-bottom: 6px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.9), rgba(255, 255, 255, 0.15));
    transform: scaleX(0);
    transform-origin: center center;
    transition: transform 280ms cubic-bezier(.2, .9, .2, 1);
    opacity: 0.95;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

.nav-links a:hover {
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #fff;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 60px;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 100px;
    position: relative;
}

h1.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    line-height: 1;
    margin-bottom: 20px;
    font-weight: 700;
    position: relative;
    background-image: linear-gradient(135deg, #fff 0%, #b0b0b0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInDown 0.9s ease-out;
}

h1.hero-title::before,
h1.hero-title::after {
    display: none;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.btn {
    padding: 15px 30px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--card-border);
}

/* Bento Grid Layout */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 20px;
    grid-auto-rows: minmax(120px, auto);
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

.card:hover {
    transform: perspective(1000px) translateY(-4px) scale(1.01);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.12);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    pointer-events: none;
}

.card-content {
    transform: translateZ(30px);
}

.card h3 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 10px;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.card-arrow {
    align-self: flex-end;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: 0.3s;
    transform: translateZ(20px);
}

.card:hover .card-arrow {
    background: #fff;
    color: #000;
    transform: translateZ(20px) rotate(-45deg);
}

.span-2 {
    grid-column: span 2;
}

.span-1 {
    grid-column: span 1;
}

.card-perf:hover {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
}

.card-discord:hover {
    box-shadow: 0 0 30px rgba(88, 101, 242, 0.15);
    border-color: rgba(88, 101, 242, 0.3);
}

.card-telegram:hover {
    box-shadow: 0 0 30px rgba(36, 161, 222, 0.15);
    border-color: rgba(36, 161, 222, 0.3);
}

/* Particles */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    background-image: url('');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 50% 50%;
    z-index: 0;
    pointer-events: none;
}

/* Footer */
footer {
    margin-top: 100px;
    padding: 40px;
    border-top: 1px solid var(--card-border);
    text-align: center;
    color: var(--text-muted);
}

.footer-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    animation: bounce 2s infinite;
}

.logo-text {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    display: block;
    text-shadow: 0 0 15px rgba(139, 92, 246, 0.6);
}

.loading-bar {
    width: 150px;
    height: 5px;
    background: var(--card-border);
    border-radius: 5px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-bar::after {
    content: '';
    display: block;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: loading-move 1.5s infinite linear;
}

#tab-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px) saturate(120%);
    opacity: 0;
    transition: opacity 240ms ease;
}

body.tab-return #tab-overlay {
    opacity: 1;
    pointer-events: none;
    transition: opacity 240ms ease;
}

body.tab-return .container,
body.tab-return nav,
body.tab-return footer {
    transform: translateY(6px);
    opacity: 0.98;
    transition: transform 260ms ease, opacity 240ms ease;
}

/* Responsive */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .span-2 {
        grid-column: span 2;
    }
}

@media (min-width: 900px) {
    .wide-card {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .nav-links {
        display: none;
    }
    .menu-toggle {
        display: block;
    }
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .span-2 {
        grid-column: span 1;
    }
    h1.hero-title {
        font-size: 2.5rem;
    }
}

/* Keyframes */
@keyframes pulseBackground {
    0% { opacity: 0.5; }
    100% { opacity: 0.8; }
}

@keyframes gridMove {
    0% { background-position: center 0; }
    100% { background-position: center 50px; }
}


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

    100% {
        transform: rotate(360deg);
    }
}

@keyframes loading-move {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(330%); }
}

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

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    h1.hero-title {
        animation: fadeInDown 0.9s ease-out;
        background-position: 0 0, 0 0;
    }
    .background-fx,
    .grid-overlay,
    .loading-bar::after {
        animation: none;
    }
}

/* Page header styles */
.page-header {
    text-align: center;
    margin-bottom: 60px;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* About page specific styles */
.about-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    position: relative;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.role-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.role-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    margin-right: 20px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    transform: perspective(1px) translateZ(0);
}

.role-icon.telegram {
    background-color: #0088CC;
    color: white;
    box-shadow: 0 0 25px rgba(0, 136, 204, 0.7);
}

.role-icon.discord {
    background-color: #5865F2;
    color: white;
    box-shadow: 0 0 25px rgba(88, 101, 242, 0.7);
}

.role-icon.instagram {
    background: #E1306C;
    color: white;
    box-shadow: 0 0 25px rgba(225, 48, 108, 0.7);
}

.section-title.instagram-border {
    border-bottom: 2px solid #E1306C !important;
}

.role-details h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}

.role-details p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Guides page specific styles */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.guide-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border-left: 4px solid transparent;
    will-change: transform, box-shadow;
    transition: all 0.3s ease-out;
}

.guide-card:hover {
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.6), 0 8px 20px rgba(0, 0, 0, 0.6);
    transform: scale(1.02);
    border-left-color: #FF0000;
}

.video-preview-link {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background-color: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(0.65);
    transition: filter 0.3s ease;
}

.video-preview-link:hover {
    filter: brightness(0.9);
}

.play-icon {
    position: absolute;
    font-size: 2rem;
    color: #FF0000;
    opacity: 0.9;
    z-index: 5;
    transition: all 0.2s ease;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    top: 15px;
    right: 15px;
}

.video-preview-link:hover .play-icon {
    transform: scale(1.05);
    opacity: 1;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.card-content {
    padding: 20px;
}

.card-content h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.guide-info {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-main);
    border-top: 1px solid var(--card-border);
    padding-top: 10px;
}

.guide-info i {
    color: var(--primary);
    margin-right: 5px;
}

.guide-card .card-content .credits {
    font-size: 0.85rem;
    color: #888;
    margin-top: -5px;
    margin-bottom: 5px;
    font-weight: 500;
}

/* Performance page specific styles */
.exm-showcase {
    background: linear-gradient(145deg, rgba(255, 75, 75, 0.05), rgba(0, 0, 0, 0.4));
    border: 1px solid rgba(255, 75, 75, 0.3);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(255, 75, 75, 0.05);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

.exm-showcase::before {
    content: 'FEATURED TOOL';
    position: absolute;
    top: 20px;
    right: 20px;
    background: #ff4b4b;
    color: #000;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 20px;
    box-shadow: 0 0 15px #ff4b4b;
}

.exm-content {
    flex: 2;
    min-width: 300px;
}

.exm-visual {
    flex: 1;
    min-width: 200px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.exm-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: #fff;
}

.exm-desc {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 1rem;
}

.exm-features {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag i {
    color: #ff4b4b;
}

.btn-exm {
    display: inline-block;
    background: #ff4b4b;
    color: #000;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 12px;
    text-decoration: none;
    transition: 0.3s;
    box-shadow: 0 0 20px rgba(255, 75, 75, 0.3);
}

.btn-exm:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 40px rgba(255, 75, 75, 0.6);
}

.tech-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 2px solid #ff4b4b;
    position: relative;
    animation: spin 10s linear infinite;
    box-shadow: 0 0 30px rgba(255, 75, 75, 0.2);
}

.tech-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    border: 1px dashed rgba(255, 255, 255, 0.5);
    border-radius: 50%;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 25px;
    border-radius: 16px;
    transition: 0.3s;
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

.tool-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.tool-icon {
    font-size: 1.5rem;
    color: var(--primary);
}

.tool-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.tool-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

.btn-tool {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid var(--primary);
    padding-bottom: 2px;
    font-size: 0.9rem;
}

/* PC Parts page specific styles */
.parts-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 20px;
    align-items: start;
    grid-auto-flow: dense;
    grid-auto-rows: minmax(140px, auto);
}

@media (max-width: 1200px) {
    .parts-grid {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .parts-grid {
        grid-template-columns: 1fr;
    }
}

.part-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    margin-bottom: 0;
}

.part-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 15px;
    border: 2px solid transparent;
    pointer-events: none;
    transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.part-card:hover {
    transform: translateY(-6px) perspective(1000px);
}

.part-card:hover::after {
    border-color: var(--component-color, var(--primary));
    box-shadow: 0 18px 40px rgba(var(--component-color-rgb, 139, 92, 246), 0.20);
}

.part-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 5px;
    background: var(--primary);
    transition: background 0.3s;
}

.part-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.05);
    transition: color 0.3s;
}

.part-type {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    color: var(--primary);
}

.part-model {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
}

.part-spec {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.part-spec-label {
    color: var(--text-muted);
}

.part-spec-value {
    color: #fff;
    font-weight: 600;
}

/* Component-specific colors */
.part-cpu {
    --component-color: #f59e0b;
    --component-color-rgb: 245, 158, 11;
}

.part-cpu::before {
    background: var(--component-color);
}

.part-cpu .part-type {
    color: var(--component-color);
}

.part-gpu {
    --component-color: #10b981;
    --component-color-rgb: 16, 185, 129;
}

.part-gpu::before {
    background: var(--component-color);
}

.part-gpu .part-type {
    color: var(--component-color);
}

.part-ram {
    --component-color: #3b82f6;
    --component-color-rgb: 59, 130, 246;
}

.part-ram::before {
    background: var(--component-color);
}

.part-ram .part-type {
    color: var(--component-color);
}

.part-mb {
    --component-color: #a855f7;
    --component-color-rgb: 168, 85, 247;
}

.part-mb::before {
    background: var(--component-color);
}

.part-mb .part-type {
    color: var(--component-color);
}

.part-psu {
    --component-color: #eab308;
    --component-color-rgb: 234, 179, 8;
}

.part-psu::before {
    background: var(--component-color);
}

.part-psu .part-type {
    color: var(--component-color);
}

.part-case {
    --component-color: #06b6d4;
    --component-color-rgb: 6, 182, 212;
}

.part-case::before {
    background: var(--component-color);
}

.part-case .part-type {
    color: var(--component-color);
}

.part-monitor {
    --component-color: #f43f5e;
    --component-color-rgb: 244, 63, 94;
}

.part-monitor::before {
    background: var(--component-color);
}

.part-monitor .part-type {
    color: var(--component-color);
}

.part-keyboard {
    --component-color: #ff7ab6;
    --component-color-rgb: 255, 122, 182;
}

.part-keyboard::before {
    background: var(--component-color);
}

.part-keyboard .part-type {
    color: var(--component-color);
}

.part-mouse {
    --component-color: #00c2a8;
    --component-color-rgb: 0, 194, 168;
}

.part-mouse::before {
    background: var(--component-color);
}

.part-mouse .part-type {
    color: var(--component-color);
}

/* Grid positioning for large screens */
@media (min-width: 992px) {
    .part-cpu {
        grid-column: 1;
        grid-row: 1;
    }

    .part-gpu {
        grid-column: 2;
        grid-row: 1;
    }

    .part-ram {
        grid-column: 3;
        grid-row: 1;
    }

    .part-mb {
        grid-column: 1;
        grid-row: 2;
    }

    .part-psu {
        grid-column: 2;
        grid-row: 2;
    }

    .part-case {
        grid-column: 3;
        grid-row: 2;
    }

    .part-monitor {
        grid-column: 1;
        grid-row: 3;
    }

    .part-keyboard {
        grid-column: 2;
        grid-row: 3;
    }

    .part-mouse {
        grid-column: 3;
        grid-row: 3;
    }
}

/* Game Settings page specific styles */
.game-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.game-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    padding: 12px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-2px);
}

.game-btn.active {
    color: #fff;
    border-color: transparent;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.game-btn.active[data-game="fortnite"] {
    background: var(--primary);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.game-btn.active[data-game="valorant"] {
    background: #ff4655;
    box-shadow: 0 0 20px rgba(255, 70, 85, 0.4);
}

.game-content {
    display: none;
    animation: fadeUp 0.5s ease forwards;
}

.game-content.active {
    display: block;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.setting-group {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 30px;
    position: relative;
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

.setting-group::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    border: 2px solid transparent;
    pointer-events: none;
    transition: border-color 0.2s ease, box-shadow 0.25s ease;
}

.setting-group:hover {
    transform: translateY(-6px);
}

.setting-group:hover::after {
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.16);
}

.group-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.group-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.setting-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.setting-value {
    color: #fff;
    font-weight: 600;
    font-family: monospace;
    font-size: 1.1rem;
}

.copy-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed var(--card-border);
    padding: 15px;
    border-radius: 8px;
    font-family: monospace;
    color: var(--text-muted);
    word-break: break-all;
    font-size: 0.85rem;
    position: relative;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}

.copy-box:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.copy-box::after {
    content: 'CLICK TO COPY';
    position: absolute;
    top: -10px;
    right: 10px;
    background: #fff;
    color: #000;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    white-space: nowrap;
}

.copy-box[data-copied="true"]::after {
    content: 'COPIED!';
    background: #10b981;
    color: #fff;
}

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

/* Discord page specific styles */
.discord-wrapper {
    max-width: 600px;
    width: 100%;
    margin-top: 100px;
    text-align: center;
}

.discord-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.discord-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 8px;
    background: #5865F2;
}

.discord-icon {
    font-size: 4rem;
    color: #5865F2;
    margin-bottom: 20px;
}

.discord-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.discord-description {
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.6;
}

.join-button {
    display: inline-block;
    padding: 15px 30px;
    background: #5865F2;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border-radius: 10px;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(88, 101, 242, 0.4);
}

.join-button:hover {
    background: #7289DA;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(88, 101, 242, 0.6);
}

.details-grid {
    margin-top: 30px;
    display: flex;
    justify-content: space-around;
    text-align: center;
    border-top: 1px solid var(--card-border);
    padding-top: 20px;
}

.detail-item strong {
    display: block;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 5px;
}

.detail-item span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .discord-card {
        padding: 30px 20px;
    }

    .details-grid {
        flex-direction: column;
        gap: 20px;
    }

    .container {
        align-items: center;
    }
}

/* Telegram page specific styles */
.telegram-wrapper {
    max-width: 600px;
    width: 100%;
    margin-top: 100px;
    text-align: center;
}

.telegram-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    text-align: left;
}

.telegram-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 8px;
    background: #0088CC;
}

.telegram-icon {
    font-size: 4rem;
    color: #0088CC;
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

.telegram-title-text {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.telegram-description {
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.6;
    text-align: center;
}

.join-button {
    display: block;
    width: fit-content;
    margin: 0 auto 30px;
    padding: 15px 30px;
    background: #0088CC;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border-radius: 10px;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(0, 136, 204, 0.4);
    text-align: center;
}

.join-button:hover {
    background: #4ab3f4;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 136, 204, 0.6);
}

.details-grid {
    margin-top: 30px;
    display: flex;
    justify-content: space-around;
    text-align: center;
    border-top: 1px solid var(--card-border);
    padding-top: 20px;
}

.detail-item strong {
    display: block;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 5px;
}

.detail-item span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .telegram-card {
        padding: 30px 20px;
    }

    .details-grid {
        flex-direction: column;
        gap: 20px;
    }

    .container {
        align-items: center;
    }
}

/* Discord and Telegram page layout fixes */
.page-discord .page-header,
.page-telegram .page-header {
    text-align: center;
    margin-bottom: 60px;
    width: 100%;
    position: absolute;
    top: 120px;
}

.page-discord .container,
.page-telegram .container {
    max-width: 1200px;
    margin: 140px auto 60px;
    padding: 0 20px;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Ensure nav consistency across all pages */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(15px);
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--card-border);
    transition: background 0.3s, padding 0.3s, border-bottom 0.3s;
}

nav.scrolled {
    background: rgba(0, 0, 0, 0.5);
    padding: 15px 5%;
    border-bottom: 1px solid var(--primary);
}

/* Focus styles for better accessibility */
.btn:focus,
.card:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Dark mode styles */
.dark-mode {
    background-color: #0f0f0f;
    color: #ffffff;
}

/* Light mode styles - proper white theme with inverted colors */
.light-mode {
    background-color: #ffffff;
    color: #1a1a1a;
}

.light-mode .background-fx {
    background:
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.08), transparent 25%);
}

.light-mode .grid-overlay {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
}

.light-mode .logo {
    background: linear-gradient(to right, #1a1a1a, #666666);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.light-mode nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.light-mode .nav-links a {
    color: #1a1a1a;
}

.light-mode .nav-links a:hover {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.light-mode .card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.light-mode .card h3 {
    color: #1a1a1a;
}

.light-mode .card p {
    color: #666666;
}

.light-mode .card-arrow {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
}

.light-mode .card-arrow:hover {
    background: var(--primary);
    color: #ffffff;
}

.light-mode #particles-js {
    background-color: #f8f9fa;
}

.light-mode footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: #666666;
}

.light-mode .footer-links a {
    color: #666666;
}

.light-mode .hero-title {
    background-image: linear-gradient(135deg, #1a1a1a 0%, #666666 100%);
}

.light-mode .hero-subtitle {
    color: #666666;
}

.light-mode .btn-primary {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.light-mode .btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: #666666;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.light-mode .page-title {
    color: #1a1a1a;
}

.light-mode .page-subtitle {
    color: #666666;
}

.light-mode .about-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.light-mode .section-title {
    color: #1a1a1a;
    border-bottom: 2px solid var(--primary);
}

.light-mode .role-details h4 {
    color: #1a1a1a;
}

.light-mode .role-details p {
    color: #666666;
}

.light-mode .guide-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.light-mode .card-content h4 {
    color: var(--primary);
}

.light-mode .card-content p {
    color: #666666;
}

.light-mode .exm-showcase {
    background: linear-gradient(145deg, rgba(255, 75, 75, 0.08), rgba(255, 255, 255, 0.9));
    border: 1px solid rgba(255, 75, 75, 0.2);
}

.light-mode .exm-title {
    color: #1a1a1a;
}

.light-mode .exm-desc {
    color: #666666;
}

.light-mode .tag {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
}

.light-mode .tool-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.light-mode .tool-title {
    color: #1a1a1a;
}

.light-mode .tool-desc {
    color: #666666;
}

.light-mode .part-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.light-mode .part-model {
    color: #1a1a1a;
}

.light-mode .part-spec-label {
    color: #666666;
}

.light-mode .part-spec-value {
    color: #1a1a1a;
}

.light-mode .game-btn {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #666666;
}

.light-mode .game-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
}

.light-mode .setting-group {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.light-mode .group-title {
    color: #1a1a1a;
}

.light-mode .setting-label {
    color: #666666;
}

.light-mode .setting-value {
    color: #1a1a1a;
}

.light-mode .copy-box {
    background: rgba(255, 255, 255, 0.8);
    border: 1px dashed rgba(0, 0, 0, 0.2);
    color: #666666;
}

.light-mode .copy-box:hover {
    border-color: var(--primary);
    color: #1a1a1a;
    background: rgba(255, 255, 255, 0.95);
}

.light-mode .discord-card,
.light-mode .telegram-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.light-mode .discord-title,
.light-mode .telegram-title-text {
    color: #1a1a1a;
}

.light-mode .discord-description,
.light-mode .telegram-description {
    color: #666666;
}

.light-mode .detail-item strong {
    color: #1a1a1a;
}

.light-mode .detail-item span {
    color: #666666;
}

.dark-mode .logo {
    background: linear-gradient(to right, #ffffff, #e0e0e0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dark-mode nav {
    background: rgba(26, 26, 26, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .nav-links a {
    color: #ffffff;
}

.dark-mode .card {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.dark-mode .card h3,
.dark-mode .card p {
    color: #ffffff;
}

/* Theme toggle button styles */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 1001;
    font-size: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.theme-toggle:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.95);
}

/* Theme toggle icon */
.theme-toggle::before {
    content: '🌙';
    margin-right: 8px;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.dark-mode .theme-toggle::before {
    content: '🌚';
}

.theme-toggle:hover::before {
    transform: rotate(180deg) scale(1.2);
}

.theme-toggle:active::before {
    transform: rotate(180deg) scale(1.1);
}

/* Remove unused animations for performance */
@keyframes sweep {
    /* Unused - removed */
}

@keyframes sweep-slow {
    /* Unused - removed */
}

/* Mobile card text overflow fixes */
@media (max-width: 600px) {
    .card {
        padding: 20px;
        border-radius: 16px;
    }

    .card h3 {
        font-size: 1.3rem;
        margin-bottom: 8px;
        word-wrap: break-word;
        hyphens: auto;
    }

    .card p {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 15px;
        word-wrap: break-word;
        hyphens: auto;
    }

    .card-arrow {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }

    /* Ensure text doesn't overflow cards */
    .card-content {
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
