:root {
    --bg-color: #0d1117;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --danger: #ef4444;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Dynamic Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(100px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, #6366f1, #3b82f6);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, #8b5cf6, #ec4899);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 30%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, #10b981, #3b82f6);
    animation-delay: -10s;
    opacity: 0.4;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(10%, 10%) scale(1.1);
    }
}

/* Container & Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: Center;
    padding: 1rem 2rem;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease;
}

h1 {
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #e0e7ff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
    color: #fff;
    background: var(--accent);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

/* Sections */
main section {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

main section.active-section {
    display: block;
}

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

h2 {
    font-weight: 600;
    font-size: 1.8rem;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

/* Grid & Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
    gap: 2rem;
}

.game-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.game-thumb {
    width: 100%;
    height: 160px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
}

.game-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    font-size: 3rem;
}

.game-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.game-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    word-break: break-all;
}

.game-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tables */
.table-container {
    overflow-x: auto;
    padding: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.score-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    padding: 2.5rem;
    position: relative;
}

.popup-anim {
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.close-btn:hover {
    color: white;
}

.modal-content h2 {
    margin-bottom: 2rem;
}

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

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #e4e4e7;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(16, 185, 129, 0.5);
    /* green border */
    border-radius: 8px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10001;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.5);
}