:root {
    --bg-dark: #0a0a0b;
    --bg-card: rgba(255, 255, 255, 0.05);
    --gold: #D4AF37;
    --gold-bright: #FFD700;
    --text-white: #ffffff;
    --text-gray: #a0a0a0;
    --glass: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);
    --transition: all 0.3s ease;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

.gold-text {
    color: var(--gold);
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 11, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.header-content {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    position: relative;
    padding: 0.4rem;
    border-radius: 10px;
    transition: var(--transition);
}

.logo-container:hover {
    background: rgba(255, 255, 255, 0.05);
}

.logo-img {
    height: 28px;
    width: auto;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.7;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    opacity: 1;
    color: var(--gold);
}

/* Search Bar */
.search-container {
    flex-grow: 1;
    max-width: 600px;
}

.search-bar {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 0.35rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.search-bar:focus-within {
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.search-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.search-bar input {
    background: none;
    border: none;
    color: white;
    width: 100%;
    font-size: 0.95rem;
    outline: none;
}

/* Account & Dropdown */
.account-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Notifications Badge */
.notification-btn {
    position: relative;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.notification-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff4d4d;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-dark);
}

.notifications-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    width: 320px;
    background: #151517;
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    z-index: 1200;
    overflow: hidden;
}

.notif-header {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
}

.notif-list {
    max-height: 400px;
    overflow-y: auto;
}

.notif-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: var(--transition);
}

.notif-item:hover {
    background: rgba(255,255,255,0.05);
}

.notif-item.unread {
    background: rgba(212, 175, 55, 0.05);
}

.notif-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    color: var(--gold);
}

.notif-content {
    font-size: 0.8rem;
    color: var(--text-gray);
    line-height: 1.4;
}

.notif-date {
    font-size: 0.7rem;
    color: var(--text-gray);
    margin-top: 0.4rem;
}

.small-icon {
    width: 20px;
    height: 20px;
}

.user-icon {
    width: 22px;
    height: 22px;
    display: block;
    filter: drop-shadow(0 0 2px rgba(212, 175, 55, 0.3));
    transition: var(--transition);
}

.profile-btn {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.profile-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--gold);
}

.profile-btn:hover .user-icon {
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.8));
    transform: scale(1.05);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: rgba(15, 15, 17, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    min-width: 240px;
    max-height: 80vh;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding: 1rem 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    transition: var(--transition);
    z-index: 1100;
}

.dropdown-content::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

#categories-list {
    list-style: none;
}

.hidden {
    display: none !important;
}

.dropdown-header {
    padding: 0.5rem 1.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-gray);
    font-weight: 600;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem;
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    padding-left: 1.8rem;
}

.dropdown-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 0.5rem 0;
}

/* Main Content */
main {
    padding-top: clamp(80px, 10vh, 120px);
    width: 95%;
    max-width: 1800px; /* Wider for large screens */
    margin: 0 auto;
    padding-bottom: 50px;
    min-height: 80vh;
}

/* Profile Bar */
.profile-management-bar {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 2rem;
    padding: 1rem 2rem;
}

.profile-bar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-msg {
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-profile-action {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.btn-profile-action:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--gold);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: #151517;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.9);
}

.modal-header {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    color: white;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), #96742a);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1rem;
    width: 100%;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

select.form-input option {
    background-color: #1a1a1c;
    color: white;
}

/* Sections */
.game-section {
    margin-bottom: 5rem;
    padding: 0 clamp(1rem, 6vw, 6rem);
}

.section-title {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--gold);
    border-radius: 2px;
}

.scroll-container {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: none; /* Firefox */
}

.scroll-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Game Card */
.game-card {
    min-width: clamp(240px, 15vw, 300px);
    max-width: clamp(240px, 15vw, 300px);
    background: var(--bg-card);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.08);
}

.game-thumb-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #1a1a1c;
    overflow: hidden; /* Prevent image overflow */
}

.game-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--gold);
    color: black;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-approved {
    background: rgba(0, 255, 127, 0.1);
    color: #00ff7f;
    border: 1px solid rgba(0, 255, 127, 0.2);
}

.status-pending {
    background: rgba(255, 165, 0, 0.1);
    color: #ffa500;
    border: 1px solid rgba(255, 165, 0, 0.2);
}

.game-info {
    padding: 1.2rem;
}

.game-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.author-label {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-bottom: 0.8rem;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rating {
    color: var(--gold);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.rating::before {
    content: '★';
}

.compatibility-icons {
    display: flex;
    gap: 0.5rem;
}

.comp-icon {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

.main-footer {
    text-align: center;
    padding: 3rem;
    color: var(--text-gray);
    font-size: 0.9rem;
    border-top: 1px solid var(--glass-border);
}

/* Utilities */
.loading-spinner {
    text-align: center;
    padding: 5rem;
    font-size: 1.2rem;
    color: var(--gold);
}

.share-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.share-btn {
    padding: 0.8rem;
    font-size: 0.8rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

@media (max-width: 768px) {
    .header-content {
        padding: 0.8rem 1rem;
        gap: 1rem;
    }
    .logo-text {
        display: none;
    }
    .game-card {
        min-width: 220px;
    }
}

/* Gamepad Focus Styles */
.gamepad-focused {
    outline: 4px solid var(--gold) !important;
    outline-offset: 4px !important;
    background: rgba(212, 175, 55, 0.15) !important;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
    z-index: 100;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-container.gamepad-focused {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.search-bar:has(input.gamepad-focused) {
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.15);
}

/* Achievement Notification */
.achievement-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(15, 15, 17, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid var(--gold);
    border-radius: 15px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    z-index: 9999;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6), 0 0 20px rgba(212, 175, 55, 0.2);
    transform: translateX(120%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 380px;
}

.achievement-toast.show {
    transform: translateX(0);
}

.achievement-icon-container {
    width: 50px;
    height: 50px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.achievement-icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.achievement-text {
    flex-grow: 1;
}

.achievement-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.achievement-name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: white;
}

/* Premium Floating Notification System */
.premium-toast-container {
    position: fixed;
    top: 100px;
    right: 30px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none;
}

.premium-toast {
    pointer-events: auto;
    background: rgba(15, 15, 17, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-left: 4px solid var(--gold);
    border-radius: 12px;
    padding: 1.2rem 1.8rem;
    color: white;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5), 0 0 20px rgba(212, 175, 55, 0.1);
    display: flex;
    align-items: center;
    gap: 1.2rem;
    min-width: 300px;
    max-width: 450px;
    transform: translateX(120%);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.premium-toast.show {
    transform: translateX(0);
}

.premium-toast.error {
    border-left-color: #ff4d4d;
    border-right: 1px solid rgba(255, 77, 77, 0.3);
}

.premium-toast-icon {
    font-size: 1.5rem;
}

.premium-toast-content {
    flex: 1;
}

.premium-toast-title {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--gold);
    margin-bottom: 2px;
}

.premium-toast.error .premium-toast-title {
    color: #ff4d4d;
}

.premium-toast-msg {
    display: block;
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.4;
}