:root {
    --bg-dark: #0f141e;
    --bg-panel: #1a1f2e;
    --primary-color: #ff9100;
    /* Orange Action Color */
    --primary-hover: #ffaa00;
    --text-white: #ffffff;
    --text-muted: #8b9bb4;
    --border-color: #2a3245;
    --success-green: #2ecc71;
    --danger-red: #e74c3c;
    --sidebar-width: 260px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    overflow-x: hidden;
}

/* Header */
.header {
    height: var(--header-height);
    background-color: var(--bg-panel);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(45deg, #ff9100, #ff5e00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.burger-menu {
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 20px;
    cursor: pointer;
    margin-right: 10px;
}

.btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-white);
}

.btn-login:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-register {
    background: linear-gradient(90deg, #ff9100, #ff5e00);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 94, 0, 0.3);
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 94, 0, 0.5);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--bg-panel);
    position: fixed;
    top: var(--header-height);
    left: 0;
    padding-top: 20px;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-menu li a i {
    width: 25px;
    font-size: 18px;
    margin-right: 10px;
}

.sidebar-menu li a:hover,
.sidebar-menu li.active a {
    background-color: rgba(255, 145, 0, 0.05);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 30px;
    min-height: calc(100vh - var(--header-height));
}

.hero-banner {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%), url('../images/banner1.png') no-repeat center center/cover;
    height: 400px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 60px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.banner-content h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.banner-content .highlight {
    color: var(--primary-color);
}

.banner-content p {
    color: #ccc;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.game-categories h2 {
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.game-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.game-card .card-img-top {
    transition: filter 0.3s ease;
}

.game-card:hover .card-img-top {
    filter: blur(4px);
}

.game-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.game-card:hover .game-card-overlay {
    opacity: 1;
}

.btn-game-action {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: transform 0.2s;
    width: 80%;
}

.btn-play {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 10px rgba(255, 145, 0, 0.4);
}

.btn-demo {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(4px);
}

.btn-game-action:hover {
    transform: scale(1.05);
}

/* 
.placeholder-img { ... } removed as we use real images now
*/

.card-title {
    padding: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.5);
    position: absolute;
    bottom: 0;
    width: 100%;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-panel);
    /* margin: 5% auto; */
    /* center via flex in parent */
    padding: 0;
    width: 400px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Register Modal Layout Fixes */
.register-content {
    width: 900px;
    display: flex;
    flex-direction: row;
    /* Ensure row direction */
    height: 600px;
    max-height: 90vh;
    padding: 0;
    /* Remove padding from container, handle in children */
    overflow: hidden;
    /* rounded corners */
}

.modal-left {
    flex: 0 0 35%;
    /* Fixed width for promo side */
    background: linear-gradient(135deg, #ff9100, #ff5e00);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 30px;
    text-align: center;
    position: relative;
    /* Context for absolute visuals */
}

.modal-right {
    flex: 1;
    /* Take remaining space */
    padding: 40px;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-panel);
    overflow-y: auto;
    /* Allow scrolling if specific step is tall */
    position: relative;
}

/* Step Indicators */
.step-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.step-dot {
    width: 12px;
    height: 12px;
    background-color: #2a3245;
    border-radius: 50%;
    transition: all 0.3s;
}

.step-dot.active {
    background-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(255, 145, 0, 0.5);
}

.step-line {
    width: 40px;
    height: 3px;
    background-color: #2a3245;
    margin: 0 5px;
}

/* Fix Input Icons Overlapping Text */
.input-with-icon {
    position: relative;
    width: 100%;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    /* Center vertically */
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
}

.input-with-icon input,
.input-with-icon select {
    width: 100%;
    padding: 12px 15px 12px 45px !important;
    /* Force padding-left for icon space */
    background-color: #0f141e;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #fff !important;
    /* Ensure text visible */
    font-size: 1rem;
    height: 45px;
    /* Fixed height for consistency */
}

/* Specific adjustment for right-aligned icons */
.input-with-icon i.right-icon {
    left: auto;
    right: 15px;
    pointer-events: auto;
    cursor: pointer;
}

.input-with-icon i.small-icon {
    font-size: 0.8rem;
}

.input-with-icon input:focus,
.input-with-icon select:focus {
    border-color: var(--primary-color);
}

.input-with-icon input:focus+i {
    color: var(--primary-color);
}

/* Select Styling */
select {
    appearance: none;
    background-color: #0f141e;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
    padding: 12px;
    width: 100%;
    cursor: pointer;
}

/* Error message positioning */
.error-msg {
    color: var(--danger-red);
    font-size: 0.8rem;
    margin-top: 4px;
    padding-left: 5px;
    display: none;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
}

.highlight-text {
    color: var(--primary-color);
    font-weight: 600;
}

/* Form Buttons */
.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-buttons .btn {
    flex: 1;
    margin-top: 0;
}

.btn-text {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-white);
}

.btn-text:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Login Modal Specific */
.login-content {
    background-color: var(--bg-panel);
    padding: 40px;
    width: 450px;
    /* specific width for login */
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    /* No flex needed here as it's a single column stack */
}

.login-content .close {
    padding: 10px;
}

.form-footer {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
    margin-top: -5px;
}

.forgot-pass {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-pass:hover {
    color: var(--primary-color);
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.close:hover {
    color: #fff;
}

h2 {
    margin-bottom: 20px;
    color: var(--text-white);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px;
    background-color: #0f141e;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-full {
    width: 100%;
    margin-top: 10px;
    background: var(--primary-color);
    color: white;
}

.btn-full:hover {
    background: var(--primary-hover);
}

.modal-switch {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.modal-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.step {
    display: none;
}

.step.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        z-index: 101;
    }

    .main-content {
        margin-left: 0;
    }

    .register-content {
        width: 90%;
        flex-direction: column;
        height: auto;
    }

    .modal-left {
        display: none;
    }

    .modal-content {
        width: 90%;
    }
}

/* Logged In User Header Styles */
.user-info-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-balance {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.user-balance .amount {
    color: var(--success-green);
}

.btn-deposit {
    background-color: var(--success-green);
    color: #fff;
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-deposit:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
}

.user-profile {
    color: var(--primary-color);
}

/* =========================================
   DEPOSIT MODAL STYLES
   ========================================= */

.deposit-content {
    width: 1000px;
    height: 700px;
    max-width: 95vw;
    max-height: 90vh;
    background-color: #1a1f2e;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    z-index: 20;
}

.close-modal:hover {
    color: #fff;
}

.deposit-layout {
    display: flex;
    height: 100%;
}

/* Left Sidebar */
.deposit-sidebar {
    width: 280px;
    background-color: #151925;
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

.user-summary-card {
    background: linear-gradient(180deg, #2a3245 0%, #1a1f2e 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.user-avatar i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.u-name {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}

.u-username {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.u-balance {
    background-color: rgba(46, 204, 113, 0.1);
    color: var(--success-green);
    padding: 8px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 1.2rem;
}

.deposit-nav {
    list-style: none;
}

.deposit-nav li {
    margin-bottom: 10px;
}

.deposit-nav li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.deposit-nav li a i {
    width: 25px;
}

.deposit-nav li.active a,
.deposit-nav li a:hover {
    background-color: rgba(255, 145, 0, 0.1);
    color: var(--primary-color);
}

/* Main Area */
.deposit-main-area {
    flex: 1;
    padding: 30px 40px;
    overflow-y: auto;
    position: relative;
}

.deposit-header {
    margin-bottom: 30px;
}

.deposit-header h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.payment-filters {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.p-filter {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.p-filter:hover,
.p-filter.active {
    border-color: var(--primary-color);
    background-color: rgba(255, 145, 0, 0.1);
    color: var(--primary-color);
}

/* Payment Grid */
.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.payment-card {
    background-color: #232938;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.payment-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.pm-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 15px;
}

.pm-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.pm-limits {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.pm-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.pm-badge.popular {
    background-color: var(--primary-color);
    color: #fff;
}

/* Deposit Detail View */
.back-to-methods {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-to-methods:hover {
    color: #fff;
}

.deposit-form-container {
    max-width: 500px;
    margin: 0 auto;
    background-color: #232938;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.selected-method-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.selected-method-header img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.amount-input-section {
    margin-bottom: 25px;
}

.amount-input-wrapper {
    position: relative;
    margin-top: 10px;
}

.amount-input-wrapper input {
    width: 100%;
    height: 60px;
    background-color: #151925;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    padding-left: 40px;
    /* Space for symbol */
}

.amount-input-wrapper input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.amount-input-wrapper .currency {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--text-muted);
}

.quick-amounts {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.quick-amounts button {
    flex: 1;
    background-color: #151925;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-amounts button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.bonus-selection {
    margin-bottom: 30px;
}

.btn-deposit-confirm {
    height: 55px;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(255, 145, 0, 0.4);
}

.btn-deposit-confirm:hover {
    box-shadow: 0 6px 20px rgba(255, 145, 0, 0.6);
}

/* Responsiveness for Deposit Modal */
@media (max-width: 900px) {
    .deposit-sidebar {
        display: none;
    }

    .deposit-content {
        width: 100%;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }

    .deposit-main-area {
        padding: 20px;
    }
}

/* =========================================
   IBAN DEPOSIT MODAL STYLES
   ========================================= */

.iban-modal-content {
    width: 480px;
    background-color: #232938;
    border-radius: 16px;
    padding: 30px;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.iban-modal-header {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.iban-modal-header h3 {
    font-size: 1.4rem;
    color: #fff;
}

.iban-field-group {
    margin-bottom: 15px;
}

.iban-field-group label {
    display: block;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.iban-field {
    background-color: #151925;
    border: 1px solid var(--border-color);
    color: #fff;
    border-radius: 8px;
    padding: 12px 15px;
    width: 100%;
    font-family: monospace;
    font-size: 1rem;
}

.iban-field.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #0f1219;
}

.warning-box {
    background-color: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin: 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.5;
}

.warning-box i {
    font-size: 1.2rem;
    margin-top: 2px;
}

.btn-confirm-payment {
    background-color: var(--success-green);
    color: white;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-confirm-payment:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

/* Queue Modal styling */
.queue-modal-content {
    background-color: #232938;
    text-align: center;
    padding: 40px;
    width: 400px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    position: relative;
}

.queue-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: inline-block;
    animation: queuePulse 2s infinite;
}

@keyframes queuePulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.queue-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 20px;
}

.queue-timer-highlight {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}