/* Xbox Series X Dashboard - 1:1 Clone */

:root {
    --xbox-green: #107C10;
    --xbox-dark: #101010;
    --card-bg: #2d2d2d;
    --text-white: #ffffff;
    --text-gray: #cccccc;
    --focus-border: 2px solid #ffffff;
    --hover-scale: 1.05;
}

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

body {
    font-family: 'Segoe UI', sans-serif;
    color: var(--text-white);
    background: #000;
    overflow: hidden;
    height: 100vh;
}

.hidden {
    display: none !important;
}

/* Background with Overlay */
.dashboard-bg {
    position: fixed;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.6) 100%),
        url('https://images.unsplash.com/photo-1588785392665-f6d4a541417d?q=80&w=2560&auto=format&fit=crop');
    /* Fallout Power Armor aesthetic */
    background-size: cover;
    background-position: center 20%;
    z-index: -1;
    transition: transform 0.3s ease;
}

/* ================= LOGIN SCREEN ================= */
.login-screen {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    z-index: 1000;
}

.login-container {
    text-align: center;
    max-width: 400px;
}

.xbox-logo-anim {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    position: relative;
    background: var(--xbox-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 3s infinite;
}

.x-shape {
    width: 50px;
    height: 50px;
    background: inherit;
    clip-path: polygon(20% 0%, 0% 20%, 30% 50%, 0% 80%, 20% 100%, 50% 70%, 80% 100%, 100% 80%, 70% 50%, 100% 20%, 80% 0%, 50% 30%);
    background: #111;
    transform: scale(0.9);
}

.login-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 40px;
}

.login-btn,
.demo-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
}

.login-btn {
    background: var(--xbox-green);
    color: white;
}

.login-btn:hover {
    background: #159115;
}

.demo-btn {
    background: transparent;
    border: 2px solid #555;
    color: #ccc;
}

.demo-btn:hover {
    border-color: white;
    color: white;
}

/* ================= DASHBOARD TOP BAR ================= */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 40px 60px;
}

/* Profile Section */
.profile-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-pic-container {
    position: relative;
    width: 48px;
    height: 48px;
}

.profile-pic {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #ff4444;
    /* Red border from image */
    padding: 2px;
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #00ff00;
    /* Online green */
    border: 2px solid #000;
    border-radius: 50%;
}

.profile-details {
    display: flex;
    flex-direction: column;
}

.gamertag-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.ultimate-badge {
    background: #333;
    color: #ccc;
    font-size: 0.6rem;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.gamerscore {
    color: var(--text-gray);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.gs-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--text-gray);
    border-radius: 50%;
    width: 14px;
    height: 14px;
    font-size: 0.6rem;
}

/* System Icons (Center) */
.system-icons {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.sys-icon {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: transform 0.2s, color 0.2s;
}

.sys-icon:hover,
.sys-icon.active {
    color: white;
    transform: translateY(-2px);
}

.gp-icon {
    background: #333;
    font-size: 0.5rem;
    line-height: 1;
    padding: 4px;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
}

/* System Status (Right) */
.system-status {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.mic-icon.muted {
    position: relative;
}

.mic-icon.muted::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: white;
    top: 50%;
    left: 0;
    transform: rotate(-45deg);
}

/* ================= MAIN GRID ================= */
.main-grid {
    position: absolute;
    bottom: 40px;
    left: 60px;
    right: 60px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Row 1: Recent Games */
.recent-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.game-card.small {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.game-card.small:hover,
.system-card:hover {
    transform: translateY(-8px) scale(1.1);
    z-index: 10;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    outline: 2px solid white;
}

.game-card.small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.system-card {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
}

.system-card.red {
    background: #8b1c1c;
    color: white;
}

.system-card.red-gradient {
    background: #8b1c1c;
    background: radial-gradient(circle, #a32424 0%, #661010 100%);
    color: white;
}

.system-card.brown {
    background: #8B4513;
}

.medal-icon {
    font-size: 2rem;
}

/* Row 2: Browse & Features */
.browse-row {
    display: flex;
    gap: 20px;
    height: 180px;
}

.feature-card {
    flex: 1;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    background: #222;
}

.feature-card:hover {
    transform: scale(1.02);
    outline: 2px solid white;
}

.feature-card.dark {
    background: linear-gradient(180deg, #1a1a1a 0%, #000 100%);
}

.feature-card.gp-gradient {
    background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    color: white;
}

.feature-card .content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
}

.feature-card.game-bg {
    background-size: cover;
    background-position: center;
}

.feature-card .footer {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.controller-icon-lg {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
    text-align: center;
    margin-top: 30px;
}

.gp-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.xbox-logo-sm {
    width: 16px;
    height: 16px;
    background-color: white;
    border-radius: 50%;
    position: relative;
}

.xbox-logo-sm::after {
    content: 'X';
    color: #3a7bd5;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: bold;
}

.storage-visual {
    border-top: 2px solid white;
    padding-top: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    position: relative;
}

.storage-visual::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid white;
}

/* Settings Panel Overlay */
.settings-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 350px;
    height: 100%;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(10px);
    border-left: 1px solid #333;
    z-index: 2000;
    display: flex;
    justify-content: center;
    padding: 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.settings-panel:not(.hidden) {
    transform: translateX(0);
}

.settings-content {
    width: 100%;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.setting-item {
    margin-bottom: 25px;
}

.setting-item label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.setting-item select {
    width: 100%;
    padding: 10px;
    background: #333;
    color: white;
    border: 1px solid #555;
    border-radius: 4px;
}

.logout-btn {
    width: 100%;
    background: #333;
    color: #ff5555;
    border: 1px solid #ff5555;
    padding: 12px;
    margin-top: 20px;
    cursor: pointer;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 124, 16, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(16, 124, 16, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 124, 16, 0);
    }
}