:root {
    --bg-color: #0a0a0a;
    --text-color: #f0f0f0;
    --accent-color: #ffffff;
    --glass-bg: rgba(10, 10, 10, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.5);
}

/* Base Body Styles */
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    overflow-y: scroll;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-sizing: border-box;
}

/* --- Dynamic Text Gradient --- */
.dynamic-text {
    background: linear-gradient(90deg, #ff3b3b, #3b82f6, #ff3b3b);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: gradientShift 3s linear infinite;
}

@keyframes gradientShift {
    to { background-position: 200% center; }
}

::selection {
    background: rgba(255, 255, 255, 0.3);
    color: var(--bg-color);
}

/* --- Layout Wrappers --- */
/* The key to vertical centering without clipping on small screens */
.main-container, .container {
    width: 100%;
    margin: auto; /* Vertically centers when flex-direction is column */
    padding: 7rem 2rem 2rem 2rem; /* Space below the fixed header */
    box-sizing: border-box;
}

.main-container {
    max-width: 600px;
    text-align: center;
    z-index: 1;
}

.container {
    max-width: 800px;
    /* Make the text pages look like elegant glass cards */
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2.5rem;
    backdrop-filter: blur(12px);
    margin-top: 8rem; /* Extra margin to clear the header clearly */
    margin-bottom: auto;
}

/* Style lists and headings in the container */
.container h1, .container h3 {
    font-family: 'Quicksand', sans-serif;
    margin-top: 0;
    color: var(--accent-color);
}

.container p, .container li {
    line-height: 1.6;
    opacity: 0.9;
}

.container ul {
    padding-left: 1.5rem;
}

.container li {
    margin-bottom: 1rem;
}

.container li i {
    color: var(--accent-color);
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

/* --- About Staggered Layout (Quinconce) --- */
.about-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.about-section.reverse {
    flex-direction: row-reverse;
}

.about-section.center {
    justify-content: center;
}

.about-section p {
    flex: 1;
    margin: 0;
}

.about-section .gallery-img {
    flex: 0 0 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* --- Video Background --- */
#bg-video {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    transform: translate(-50%, -50%);
    object-fit: cover;
    filter: grayscale(100%) brightness(0.4);
}

/* --- Main Header --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    z-index: 100;
    box-sizing: border-box;
}

.header-title a {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.header-title a:hover {
    color: var(--accent-color);
}

/* --- Language Switcher --- */
.language-switcher {
    position: relative;
}

.language-switcher .fa-globe {
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.3s ease;
}

.language-switcher .fa-globe:hover {
    color: var(--accent-color);
}

.language-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.language-dropdown button {
    background: none;
    border: none;
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.9rem;
    font-weight: bold;
    display: block;
    width: 100%;
    text-align: left;
}

.language-dropdown button:hover, .language-dropdown button.active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- Profile Header --- */
.profile-header {
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeIn 1s 0.2s forwards;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--glass-border);
    box-shadow: 0 5px 20px var(--shadow-color);
    margin-bottom: 1rem;
}

.profile-title {
    font-family: 'Quicksand', sans-serif;
    font-size: 3rem;
    margin: 0;
    letter-spacing: 2px;
}

.profile-subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* --- About Card --- */
.about-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-decoration: none;
    color: var(--text-color);
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    text-align: left;
}

.about-card h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.2rem;
    font-family: 'Quicksand', sans-serif;
}

.about-card p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.7;
}

.about-card .fa-arrow-right {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

/* --- Bento Grid --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 6 columns for desktop */
    gap: 1rem;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeIn 1s 0.4s forwards;
}

.bento-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-size: 1rem;
    font-weight: 500;
    backdrop-filter: blur(12px);
    transition: transform 0.3s ease;
    grid-column: span var(--span, 1);
    position: relative;
    overflow: hidden;
}

.bento-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.bento-title, .bento-stats {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.bento-stats {
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0;
    position: absolute;
    transform: translateY(10px);
    white-space: normal; /* Changed from nowrap to normal to allow wrapping */
    text-align: center;
    width: 100%;
    padding: 0 0.5rem;
    box-sizing: border-box;
}

/* --- Gradient Layer --- */
.bento-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: 200% 200%;
    background-position: 25% 25%;
    opacity: 0.7;
    z-index: -1;
    transition: background-position 0.8s ease, opacity 0.5s ease;
}

/* --- Static Background Logos --- */
.floating-logos {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    opacity: 0.06;
    filter: invert(1);
}

.floating-logos > div {
    position: absolute;
    background-size: contain;
    background-repeat: no-repeat;
}

.logo-1 { width: 40%; height: 40%; top: 10%; left: -15%; }
.logo-2 { width: 20%; height: 20%; top: 70%; left: 10%; }
.logo-3 { width: 15%; height: 15%; top: 5%; right: 5%; }
.logo-4 { width: 25%; height: 25%; top: 60%; right: -10%; }
.logo-5 { width: 10%; height: 10%; top: 35%; left: 30%; }
.logo-6 { width: 18%; height: 18%; top: 20%; left: 60%; }
.logo-7 { width: 12%; height: 12%; top: 85%; left: 50%; }
.logo-8 { width: 22%; height: 22%; top: -5%; left: 40%; }

/* --- Card Specific Logos & Gradients --- */
.twitch-card::before { background-image: linear-gradient(135deg, #6441a5, #a970ff); }
.twitch-card .floating-logos > div { background-image: url('https://img.icons8.com/ios-filled/100/000000/twitch.png'); }

.youtube-card::before { background-image: linear-gradient(135deg, #c4302b, #ff7e79); }
.youtube-card .floating-logos > div { background-image: url('https://img.icons8.com/ios-filled/100/000000/youtube-play.png'); }

.insta-card::before { background-image: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045); }
.insta-card .floating-logos > div { background-image: url('https://img.icons8.com/ios-filled/100/000000/instagram-new.png'); }

.tiktok-card::before { background-image: linear-gradient(135deg, #00f2ea, #ff0050); }
.tiktok-card .floating-logos > div { background-image: url('https://img.icons8.com/ios-filled/100/000000/tiktok.png'); }

.discord-card::before { background-image: linear-gradient(135deg, #5865f2, #7289da); }
.discord-card .floating-logos > div { background-image: url('https://img.icons8.com/ios-filled/100/000000/discord-logo.png'); }

.support-card::before { background-image: linear-gradient(135deg, #f9d423, #ff4e50); }
.support-card .floating-logos > div { background-image: url('https://img.icons8.com/ios-filled/100/000000/like.png'); }

.razer-card::before { background-image: linear-gradient(135deg, #00ff00, #333); }
.razer-card .floating-logos > div { background-image: url('https://img.icons8.com/ios-filled/100/000000/razer.png'); }

.x-card::before { background-image: linear-gradient(135deg, #444, #000); }
.x-card .floating-logos > div { background-image: url('https://img.icons8.com/ios-filled/100/000000/x.png'); }

.wishlist-card::before { background-image: linear-gradient(135deg, #8A2BE2, #C71585); }
.wishlist-card .floating-logos > div { background-image: url('https://img.icons8.com/ios-filled/100/000000/gift.png'); }

.bento-box i, .bento-box img {
    font-size: 1.8rem;
    line-height: 1;
    z-index: 1;
}

/* --- Footer --- */
footer {
    width: 100%;
    text-align: center;
    padding: 2rem;
    opacity: 0;
    animation: fadeIn 1s 0.6s forwards;
    box-sizing: border-box;
}

footer p { font-size: 0.9rem; opacity: 0.7; margin: 0; }
footer a { color: var(--text-color); text-decoration: none; font-weight: bold; transition: color 0.3s; }
footer a:hover { color: var(--accent-color); }

/* --- Animations --- */
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }

@keyframes pulse-color {
    0%, 100% { filter: saturate(0.3) brightness(0.8); opacity: 0.6; }
    50% { filter: saturate(1.2) brightness(1.1); opacity: 0.9; }
}

/* --- Non-Touch Device Hover Interactions --- */
.no-touch-device .about-card:hover {
    transform: translateY(-5px) scale(1.03);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}
.no-touch-device .about-card:hover .fa-arrow-right {
    transform: translateX(5px);
}
.no-touch-device .bento-box:hover {
    transform: translateY(-5px) scale(1.03);
}
.no-touch-device .bento-box:hover::before {
    background-position: 75% 75%;
    opacity: 0.9;
}
.no-touch-device .bento-box:not(.no-stats):hover .bento-title {
    opacity: 0;
    transform: translateY(-10px);
}
.no-touch-device .bento-box:not(.no-stats):hover .bento-stats {
    opacity: 1;
    transform: translateY(0);
}
.no-touch-device .gallery-img:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    z-index: 10;
    position: relative;
}

/* --- Touch Device / Mobile Interactions --- */
.touch-device .bento-box:not(.no-stats) .bento-title {
    display: block;
    transform: translateY(-5px); /* Slightly move up to make room */
}
.touch-device .bento-box:not(.no-stats) .bento-stats {
    opacity: 1;
    position: static;
    transform: none;
    white-space: normal; /* Allow text to wrap! */
    text-align: center;
    font-size: 0.75rem; /* Smaller size for stats on mobile */
    line-height: 1.2;
    margin-top: 0.2rem;
}
.touch-device .bento-box::before {
    animation: pulse-color 12s infinite;
    opacity: 0;
}

/* Staggered animation delays for touch devices */
.touch-device .insta-card::before { animation-delay: -1s; }
.touch-device .tiktok-card::before { animation-delay: -3s; }
.touch-device .youtube-card::before { animation-delay: -5s; }
.touch-device .twitch-card::before { animation-delay: -2s; }
.touch-device .discord-card::before { animation-delay: -6s; }
.touch-device .support-card::before { animation-delay: -4s; }
.touch-device .razer-card::before { animation-delay: -7s; }
.touch-device .x-card::before { animation-delay: -8s; }
.touch-device .wishlist-card::before { animation-delay: -9s; }

/* --- Responsive Layout --- */
@media (max-width: 768px) {
    /* 2 columns for smaller screens */
    .bento-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
    .bento-box { 
        grid-column: span 1 !important; 
    }
    .profile-title { 
        font-size: 2.5rem; 
    }
    .main-container {
        padding: 6rem 1rem 1rem 1rem;
    }
    .container {
        margin-top: 6rem;
        padding: 1.5rem;
        width: calc(100% - 2rem);
    }
    .main-header {
        padding: 1rem;
    }
    .about-section, .about-section.reverse {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    .about-section .gallery-img {
        flex: 0 0 auto;
        width: 100%;
        max-width: 250px;
        height: 250px;
    }
}