:root {
    --bg-dark: #1e1e2e;
    --card-bg: rgba(255, 255, 255, 0.05);
    --neon-cyan: #00f3ff;
    --neon-purple: #bc13fe;
    --text-main: #ffffff;
    --text-muted: #a6b1cf;
    --font-main: 'Outfit', sans-serif;
    --font-display: 'Rajdhani', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 50% 0%, rgba(188, 19, 254, 0.2), transparent 50%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Background Effects --- */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.suit,
.phrase,
.float-card {
    position: absolute;
    opacity: 0.08;
    color: white;
    filter: blur(1px);
    animation: float 25s infinite linear;
    user-select: none;
}

/* Suits */
.suit {
    font-size: 8rem;
}

.s1 {
    top: 10%;
    left: 10%;
    animation-duration: 25s;
}

.s2 {
    top: 70%;
    left: 80%;
    animation-duration: 30s;
    font-size: 12rem;
}

.s3 {
    top: 40%;
    left: 50%;
    animation-duration: 35s;
    font-size: 6rem;
}

.s4 {
    top: 80%;
    left: 15%;
    animation-duration: 40s;
    font-size: 10rem;
}

.s5 {
    top: 20%;
    left: 90%;
    animation-duration: 28s;
    font-size: 5rem;
}

.s6 {
    top: 5%;
    left: 40%;
    animation-duration: 32s;
    font-size: 7rem;
}

.s7 {
    top: 60%;
    left: 5%;
    animation-duration: 38s;
    font-size: 9rem;
}

.s8 {
    top: 90%;
    left: 60%;
    animation-duration: 45s;
    font-size: 6rem;
}

/* Phrases */
.phrase {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 800;
    white-space: nowrap;
    opacity: 0.03;
    letter-spacing: 2px;
}

.p1 {
    top: 15%;
    right: 20%;
    animation-duration: 40s;
    transform: rotate(-15deg);
}

.p2 {
    bottom: 25%;
    left: 10%;
    animation-duration: 35s;
    transform: rotate(10deg);
}

.p3 {
    top: 50%;
    left: 85%;
    animation-duration: 45s;
    transform: rotate(5deg);
    font-size: 3rem;
}

.p4 {
    top: 85%;
    right: 40%;
    animation-duration: 30s;
    transform: rotate(-5deg);
}

.p5 {
    top: 5%;
    left: 5%;
    animation-duration: 50s;
    transform: rotate(20deg);
    font-size: 5rem;
}

/* Floating Cards */
.float-card {
    font-family: 'Courier New', courier, monospace;
    font-size: 3rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.01);
}

.fc1 {
    top: 30%;
    left: 20%;
    animation-duration: 33s;
    transform: rotate(15deg);
}

.fc2 {
    bottom: 10%;
    right: 10%;
    animation-duration: 37s;
    transform: rotate(-10deg);
}

.fc3 {
    top: 60%;
    left: 70%;
    animation-duration: 42s;
    transform: rotate(25deg);
}

.fc4 {
    top: 10%;
    left: 60%;
    animation-duration: 29s;
    transform: rotate(-20deg);
}

/* Floating Chips - Keep existing */
.chip {
    position: absolute;
    border: 4px dashed rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    animation: rotateChip 20s infinite linear;
    z-index: -1;
}

.c1 {
    width: 120px;
    height: 120px;
    top: 15%;
    right: 10%;
    animation-duration: 25s;
    border-color: rgba(0, 243, 255, 0.1);
}

.c2 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 5%;
    animation-duration: 30s;
    border-color: rgba(188, 19, 254, 0.1);
}

.c3 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 25%;
    animation-duration: 40s;
    border-color: rgba(255, 51, 102, 0.1);
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

@keyframes rotateChip {
    from {
        transform: rotate(0deg) translate(0, 0);
    }

    50% {
        transform: rotate(180deg) translate(20px, -20px);
    }

    to {
        transform: rotate(360deg) translate(0, 0);
    }
}

.poker-quote {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.05);
    text-transform: uppercase;
    letter-spacing: 5px;
}

.container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    text-align: center;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Header */
.game-header {
    margin-bottom: 2rem;
}

.session-info {
    font-family: 'Rajdhani', monospace;
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.neon-title {
    font-size: 3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: white;
    text-shadow:
        0 0 10px rgba(0, 243, 255, 0.5),
        0 0 20px rgba(188, 19, 254, 0.3);
    margin-bottom: 0.2rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Glass Card */
.game-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    margin-bottom: 2.5rem;
    transition: transform 0.3s ease;
}

.game-card:hover {
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(0, 243, 255, 0.1);
}

/* Inputs */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    color: white;
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

/* Enhanced Focus Glow */
input:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--neon-cyan);
    box-shadow:
        0 0 15px rgba(0, 243, 255, 0.3),
        0 0 30px rgba(0, 243, 255, 0.1),
        inset 0 0 10px rgba(0, 243, 255, 0.05);
    transform: scale(1.02);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* Cyber Button */
.cyber-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    border: none;
    border-radius: 8px;
    color: white;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.cyber-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(188, 19, 254, 0.6);
}

.cyber-btn:active {
    transform: translateY(0);
}

/* Stats Panel */
.stats-panel h2 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.total-amount {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.6);
    line-height: 1;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pulse {
    animation: glowPulse 0.4s ease-out;
}

@keyframes glowPulse {
    0% {
        transform: scale(1);
        text-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
    }

    50% {
        transform: scale(1.1);
        text-shadow: 0 0 40px rgba(0, 243, 255, 0.8), 0 0 20px white;
        color: #fff;
    }

    100% {
        transform: scale(1);
        text-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
    }
}

@keyframes fadeInPlayer {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Player Roster */
.player-roster {
    width: 100%;
    margin-top: 2rem;
    text-align: left;
}

.player-roster h3 {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.player-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    animation: fadeInPlayer 0.5s ease-out;
}

.player-item:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateX(5px);
    border-color: rgba(0, 243, 255, 0.2);
}

.p-name {
    grid-column: 1 / -1;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    margin-bottom: 5px;
}

.p-buyin {
    font-size: 0.9rem;
    color: var(--text-muted);
    align-self: center;
}

.p-cashout input {
    width: 100%;
    padding: 8px;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    font-family: var(--font-main);
}

.p-cashout input:focus {
    border-color: var(--neon-cyan);
}

.player-pl {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    align-self: center;
}

.profit {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.loss {
    color: #ff3366;
    text-shadow: 0 0 10px rgba(255, 51, 102, 0.3);
}

/* Utility Class */
.hidden {
    display: none !important;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100%;
    background: rgba(10, 10, 20, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}



.modal-content {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
}

/* Summary Page Styling */
#summaryPage {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    padding-bottom: 2rem;
    animation: fadeInUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#summaryPage .game-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Awards Section */
.awards {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    justify-content: center;
}

.award {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 15px;
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.award .emoji {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.award h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.award div {
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 5px;
}

/* Summary List */
.summary-item,
.history-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-header {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr;
    padding: 10px 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 5px;
}

.summary-item {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr;
    align-items: center;
    gap: 10px;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.col-name {
    font-weight: 600;
    color: white;
    text-align: left;
}

.col-buyins {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 12px;
}

.col-net {
    font-family: var(--font-display);
    font-weight: 700;
    text-align: right;
    font-size: 1.1rem;
}

/* Analytics Chart */
.chart-container {
    margin: 20px 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.chart-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.chart-label {
    width: 80px;
    text-align: right;
    padding-right: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-container {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.05);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease-out;
}

.bar-positive {
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
}

.bar-negative {
    background: #ff3366;
    box-shadow: 0 0 10px #ff3366;
}

/* Buttons */
.danger-btn {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
    margin-top: 2rem;
}

.danger-btn:hover {
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.6);
}

.text-btn {
    background: none;
    border: none;
    color: var(--neon-cyan);
    margin-top: 1rem;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.9rem;
}

.history-list {
    text-align: left;
    margin-top: 15px;
}

.history-item {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    /* Ensure flex behavior */
    justify-content: space-between;
    transition: background 0.2s ease;
    border-radius: 8px;
    /* Slight roundness for hover */
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.05);
    /* Interactive feel */
    color: white;
}

/* Mini Button for Top Up */
.mini-btn {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    margin-left: 10px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 2px;
}

.mini-btn:hover {
    background: var(--neon-cyan);
    color: black;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.delete-btn {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    font-size: 1rem;
}

.delete-btn:hover {
    background: #ef4444;
    color: white;
    box-shadow: 0 0 10px #ef4444;
}

/* Split Analytics Chart */
.analytics-split {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

/* ... rest of existing styles ... */

.split-col {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.split-col h4 {
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 15px;
    text-align: center;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.col-profit h4 {
    color: var(--neon-cyan);
}

.col-loss h4 {
    color: #ff3366;
}

.stat-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.9rem;
    justify-content: space-between;
}

.stat-info {
    display: flex;
    flex-direction: column;
    width: 60px;
    /* Fixed width for names */
    overflow: hidden;
}

.stat-name {
    font-weight: bold;
    color: white;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-bar-container {
    flex-grow: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin: 0 10px;
    position: relative;
    display: flex;
    align-items: center;
}

.stat-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease-out;
}

.fill-profit {
    background: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.fill-loss {
    background: #ff3366;
    box-shadow: 0 0 10px rgba(255, 51, 102, 0.3);
}

.stat-val {
    font-family: var(--font-display);
    font-weight: bold;
    width: 50px;
    text-align: right;
    font-size: 1rem;
}

/* Settlement List */
.settlement-list {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 20px;
    text-align: left;
}

.settlement-item {
    font-size: 0.95rem;
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.settlement-item:last-child {
    border-bottom: none;
}

.settlement-item b {
    color: white;
    font-weight: 600;
}

#pendingSettlements {
    width: 100%;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 0.95rem;
    resize: vertical;
}

#pendingSettlements:focus {
    border-color: var(--neon-cyan);
    outline: none;
    background: rgba(0, 0, 0, 0.5);
}

/* Sticky Header */
.sticky-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 900;
    display: flex;
    justify-content: space-around;
    padding: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

/* Override utility hidden for animation if needed, but simple display toggle is fine too. 
   Let's stick to display none for simplicity unless user demanded animation. 
   User said "Sticky mini header... visible only during active game". 
   Animation is nice. */

.sticky-bar.bar-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* Use this class instead of .hidden for the bar to animate */

.sb-item {
    color: white;
    font-size: 0.9rem;
    font-family: var(--font-display);
    font-weight: 700;
}

.sb-item span {
    color: var(--neon-cyan);
}

/* Game Active Focus Mode */
.game-active .background-effects {
    opacity: 0.15 !important;
}

.background-effects {
    transition: opacity 1s ease;
}
