/* 
  AR GAME PRO - LUXURY VIP EDITION
  Style: Onyx & Gold Professional
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Outfit:wght@300;400;600;900&family=Tajawal:wght@400;700;900&display=swap');

:root {
    --bg-deep: #050505;
    --bg-card: #0a0a0a;
    --gold: #d4af37;
    --gold-bright: #f9e29c;
    --gold-dim: #aa841e;
    --primary: var(--gold);
    --secondary: #22c55e;
    --danger: #ef4444;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --glass: rgba(10, 10, 10, 0.85);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: radial-gradient(circle at 50% 50%, #111 0%, #050505 100%);
    color: var(--text-main);
    font-family: 'Tajawal', 'Outfit', sans-serif;
    height: 100vh;
    display: flex;
    justify-content: center;
    overflow: hidden;
    position: relative;
    direction: rtl;
    /* Professional Arabic alignment */
}

/* Auth Overlay - Minimalist Elegance */
.overlay {
    position: fixed;
    inner: 0;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.auth-box {
    background: var(--bg-card);
    border: 1px solid var(--gold-dim);
    padding: 4rem 2rem;
    border-radius: 4px;
    /* Classic sharp corners for luxury */
    width: 90%;
    max-width: 400px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 1), 0 0 30px rgba(212, 175, 55, 0.1);
    text-align: center;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--gold);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 3rem;
    letter-spacing: 2px;
}

.input-group input {
    width: 100%;
    padding: 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid #222;
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: 0.4s;
    margin-bottom: 2rem;
}

.input-group input:focus {
    border-bottom-color: var(--gold);
}

.submit-btn {
    width: 100%;
    padding: 18px;
    background: var(--gold);
    border: none;
    color: black;
    font-weight: 900;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    background: var(--gold-bright);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* Admin Dashboard Styles */
.admin-txn-item {
    background: #000;
    border: 1px solid #1a1a1a;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.txn-actions {
    display: flex;
    gap: 8px;
}

.approve-btn,
.reject-btn {
    padding: 8px 15px;
    border: none;
    font-weight: 900;
    cursor: pointer;
    font-family: 'Tajawal';
    font-size: 0.8rem;
    transition: 0.3s;
}

.approve-btn {
    background: var(--gold);
    color: black;
}

.approve-btn:hover {
    background: var(--gold-bright);
}

.reject-btn {
    background: #222;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.reject-btn:hover {
    background: var(--danger);
    color: white;
}

.lux-btn-gold {
    width: 100%;
    padding: 18px;
    background: var(--gold);
    border: none;
    color: black;
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
}

.lux-btn-gold:hover {
    background: var(--gold-bright);
    transform: scale(1.02);
}

.lux-input {
    width: 100%;
    padding: 12px;
    background: #000;
    border: 1px solid #222;
    color: white;
    margin-top: 5px;
    outline: none;
}

.lux-input:focus {
    border-color: var(--gold);
}

.lux-title {
    font-family: 'Playfair Display', serif;
    color: var(--gold);
    margin-bottom: 25px;
}

/* Game Interface */
#game-ui {
    width: 100%;
    max-width: 650px;
    background: var(--bg-deep);
    display: none;
    flex-direction: column;
    min-height: 100vh;
    /* Changed from height:100vh to allow growth */
    border-inline: 1px solid #1a1a1a;
    position: relative;
}

.top-bar {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 1px solid #1a1a1a;
    flex-shrink: 0;
}

.balance-card {
    background: #000;
    padding: 8px 15px;
    border: 1px solid var(--gold-dim);
    display: flex;
    align-items: center;
    gap: 10px;
}

.balance-card .value {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--gold);
}

.deposit-icon-btn {
    background: var(--gold);
    color: black;
    width: 20px;
    height: 20px;
    border: none;
    font-weight: 900;
    cursor: pointer;
    border-radius: 2px;
}

/* Plinko Board Area */
.game-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: radial-gradient(circle at 50% 10%, #111 0%, #050505 100%);
    overflow-y: auto;
    /* Allow scrolling if board/controls overflow */
}

#plinko-board-container {
    min-height: 400px;
    flex: 1;
    position: relative;
    border: 1px solid #111;
    overflow: hidden;
    margin-bottom: 10px;
}

.peg {
    position: absolute;
    width: 4px;
    /* Slightly smaller for mobile */
    height: 4px;
    background: var(--gold-dim);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.2);
}

.game-ball {
    position: absolute;
    width: 14px;
    /* Scaled down */
    height: 14px;
    background: radial-gradient(circle at 30% 30%, var(--gold-bright), var(--gold-dim));
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.3);
    z-index: 100;
}

/* Multipiler Buckets */
#betting-sections {
    display: flex;
    gap: 2px;
    margin-top: 10px;
    flex-shrink: 0;
}

.bucket {
    flex: 1;
    height: 40px;
    /* Reduced height */
    background: #000;
    border: 1px solid #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.7rem;
    color: var(--gold);
    transition: 0.3s;
}

/* Controls */
.controls-bar {
    padding: 15px;
    background: #000;
    border-top: 1px solid var(--gold-dim);
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.bet-control {
    flex: 1;
    border: 1px solid #222;
    display: flex;
    align-items: center;
    height: 50px;
}

.adj {
    width: 40px;
    height: 100%;
    background: #111;
    border: none;
    color: var(--gold);
    font-size: 1.2rem;
    cursor: pointer;
}

.play-btn {
    flex: 1.5;
    height: 50px;
    background: var(--gold);
    color: black;
    font-weight: 900;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
}

/* Modal Responsiveness */
.banking-portal {
    background: #050505;
    border: 1px solid var(--gold-dim);
    border-radius: 0;
    width: 98%;
    max-width: 1000px;
    height: 95vh;
    display: flex;
    flex-direction: column;
}

.portal-sidebar {
    width: 100%;
    flex-direction: row;
    height: auto;
    background: #000;
    border-bottom: 1px solid #111;
    overflow-x: auto;
}

.nav-item {
    flex: 1;
    padding: 15px;
    text-align: center;
    border: none;
    border-bottom: 3px solid transparent;
}

.nav-item.active {
    color: var(--gold);
    border-bottom: 3px solid var(--gold);
    border-left: none;
}

.payment-card {
    padding: 15px;
    min-width: 140px;
}

/* Media Queries for Small Screens */
@media (max-width: 500px) {
    .logo {
        font-size: 2rem;
    }

    .auth-box {
        padding: 2rem 1rem;
    }

    .top-bar {
        padding: 10px;
    }

    #user-name {
        font-size: 0.9rem !important;
    }

    .balance-card .value {
        font-size: 1rem;
    }

    .controls-bar {
        flex-direction: column;
    }

    .bet-control,
    .play-btn {
        width: 100%;
        height: 45px;
    }

    .admin-full-page {
        padding: 15px;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px;
        font-size: 0.8rem;
    }
}

@media (max-height: 700px) {
    #plinko-board-container {
        min-height: 250px;
    }

    .logo {
        margin-bottom: 1rem;
    }

    .bucket {
        height: 35px;
        font-size: 0.6rem;
    }
}

/* Animations & Effects */
@keyframes particlesAnim {
    to {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

.win-float {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
}

/* Admin Dedicated Page Styling */
.admin-full-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-deep);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    padding: 40px;
    overflow-y: auto;
    animation: fadeIn 0.4s ease;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 20px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.admin-table-container {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #222;
}

.admin-table th {
    background: #111;
    color: var(--gold);
    font-weight: 900;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseAdmin {
    0% {
        box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
    }

    50% {
        box-shadow: 0 0 30px rgba(255, 0, 0, 0.6);
    }

    100% {
        box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
    }
}