:root {
    --bg-deep: #0B0C10;
    --bg-section-alt: #1a1b22;
    --card-bg: #15161c;
    --text-bright: #FFFFFF;
    --text-muted: #D1D1D1;
    --accent: #E63946;
    --accent-dark: #B82E3A;
    --accent-light: #FF4D5D;
    --primary-gradient: linear-gradient(135deg, var(--accent-dark), var(--accent), var(--accent-light));
}

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

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-muted);
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('../assets/bg-desktop.png') top right / cover no-repeat;
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    top: -20%;
    left: -10%;
    width: 50%;
    height: 60%;
    background: radial-gradient(ellipse at center, rgba(180, 40, 50, 0.15) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

header {
    background-color: rgba(11, 12, 16, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: block;
    line-height: 1;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

main {
    max-width: none;
    padding: 0;
    margin: 0;
}

/* Section styling with alternating backgrounds */
.section {
    width: 100%;
    padding: 4rem 0;
    margin: 0;
    position: relative;
}

.section:nth-child(even) {
    background-color: rgba(11, 12, 16, 0.8);
}

.section:nth-child(odd) {
    background-color: rgba(26, 27, 34, 0.8);
}

/* Container for section content */
.section > h2 {
    margin-bottom: 3rem;
}

.profile-container,
.games-grid,
.achievements-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Profile Section */
.profile-container {
    display: flex;
    justify-content: center;
}

.profile-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.profile-image {
    margin-bottom: 1rem;
}

.profile-image img {
    width: 184px;
    height: 184px;
    border-radius: 50%;
    border: none;
    padding: 3px;
    background: var(--primary-gradient);
}

.profile-image i {
    font-size: 4rem;
    color: var(--accent);
}

.profile-info h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

/* Games Section */
.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.game-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.game-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 1.25rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px var(--accent-dark),
                0 0 30px var(--accent),
                0 0 40px var(--accent-light);
}

.game-image {
    margin-bottom: 1rem;
    text-align: center;
}

.game-image img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 5px;
    background-color: var(--bg-deep);
    padding: 4px;
}

.game-image i {
    font-size: 3rem;
    color: var(--accent);
}

.game-info h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--accent);
    font-weight: 600;
}

.game-info p {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-info .playtime-label {
    color: var(--text-muted);
    opacity: 0.8;
    font-style: italic;
}

.game-info .playtime-value {
    color: var(--accent);
    font-weight: 600;
    font-family: 'Consolas', monospace;
}

/* Achievements Section */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.achievement-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    height: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -50%;
    width: 200%;
    height: 300%;
    background: conic-gradient(
        transparent,
        transparent,
        transparent,
        var(--accent-light),
        transparent,
        transparent,
        transparent,
        var(--accent-dark)
    );
    animation: spin-achievement-border 4s linear infinite;
    z-index: 0;
}

.achievement-card::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: var(--bg-deep);
    border-radius: 8px;
    z-index: 0;
}

@keyframes spin-achievement-border {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.achievement-card:hover {
    border-color: var(--accent-light);
    box-shadow: 0 0 15px rgba(230, 57, 70, 0.35);
}

.achievement-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.achievement-icon img {
    width: 64px;
    height: 64px;
    border-radius: 5px;
}

.achievement-icon i {
    font-size: 2rem;
    color: var(--accent);
}

.achievement-info {
    flex-grow: 1;
    position: relative;
    z-index: 2;
}

.achievement-info h3 {
    color: var(--accent);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.achievement-info p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.achievement-info .unlock-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.7;
    font-style: italic;
}

footer {
    background-color: rgba(11, 12, 16, 0.85);
    color: var(--text-muted);
    padding: 1rem;
    text-align: center;
    margin-top: 4rem;
    position: relative;
    z-index: 1;
}

/* Swap to portrait fox on mobile */
@media (max-width: 768px) {
    body::before {
        background-image: url('../assets/bg-mobile.png');
        background-position: top right;
    }
}

/* Responsive adjustments */
@media (max-width: 1100px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .section {
        padding: 3rem 0;
    }

    .profile-container,
    .games-grid,
    .achievements-grid {
        padding: 0 1rem;
    }
}

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

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

@media (max-width: 600px) {
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .achievement-card {
        padding: 1rem;
    }
}

/* Mobile Navigation Styles */
.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 5px;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-muted);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    nav {
        padding: 0 1rem;
    }

    .hamburger-menu {
        display: flex;
        z-index: 101;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background-color: rgba(11, 12, 16, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 80px 2rem;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    }

    .nav-links.active {
        right: 0;
    }

    /* Center elements in mobile */
    main {
        padding: 2rem;
    }

    .profile-card {
        margin: 0 auto;
    }

    .games-grid {
        padding: 0 1rem;
    }

    .game-card {
        margin: 0 auto;
        max-width: 300px;
    }

    .achievements-grid {
        padding: 0 1rem;
    }

    .achievement-card {
        margin: 0 auto;
        max-width: 300px;
    }
}

/* Hamburger menu active state */
.hamburger-menu.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}
/* Section headers */
.section h2 {
    color: transparent;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    margin-bottom: 3rem;
    text-align: center;
    font-size: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* Update game info colors */
.game-info h3,
.achievement-info h3 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 600;
}

.playtime-value {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 600;
    font-family: 'Consolas', monospace;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.loading-spinner i {
    margin-right: 10px;
    font-size: 2em;
    color: var(--accent);
    animation: spin-loader 1s linear infinite;
}

.loading-spinner i.fa-exclamation-circle {
    animation: none;
}

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

.section-content {
    display: none;
}

.section-content.loaded {
    display: block;
}

.steam-links {
    display: flex;
    justify-content: center;
    gap: 1.5em;
    margin: 2.5em 0;
}

.steam-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.85em 1.75em;
    background: linear-gradient(135deg, #c42d3d 0%, #9e2430 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.steam-link:hover {
    background: linear-gradient(135deg, #e63946 0%, #c42d3d 100%);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.35);
    border-color: rgba(255, 255, 255, 0.3);
}

.steam-link:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.steam-link i {
    font-size: 1.2em;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.steam-link:hover i {
    transform: scale(1.1);
}

.add-friend-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.6em 1.2em;
    background: linear-gradient(135deg, #c42d3d 0%, #9e2430 100%);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-top: 0.5em;
}

.add-friend-btn:hover {
    background: linear-gradient(135deg, #e63946 0%, #c42d3d 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(230, 57, 70, 0.35);
    border-color: rgba(255, 255, 255, 0.3);
}

.add-friend-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.add-friend-btn i {
    font-size: 1em;
    transition: transform 0.3s ease;
}

.add-friend-btn:hover i {
    transform: scale(1.1);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5em;
    margin-bottom: 1.5em;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #c42d3d 0%, #9e2430 100%);
    color: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.35);
    background: linear-gradient(135deg, #e63946 0%, #c42d3d 100%);
}

.social-link i {
    font-size: 1.2em;
}

.social-link:active {
    transform: translateY(-1px);
}

.total-games,
.total-achievements {
    color: white;
    font-size: 1.1em;
    margin: 0.5em 0 1.5em;
    text-align: center;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
