/* ================================
   TABLE OF CONTENTS
   ================================
   1. Base Modal Framework
      1.1 Container & Backdrop
      1.2 Content Wrapper
      1.3 Animations

   2. Common Components
      2.1 Headers & Titles
      2.2 Sections & Containers
      2.3 Buttons
      2.4 Form Elements
      2.5 Feedback & Validation
      2.6 Progress Indicators

   3. Modal-Specific Styles
      3.1 Wallet Modal
      3.2 Settings Modal
      3.3 Cash Out Modal
      3.4 Post Game Modal
      3.5 Profile Modal
      3.6 Insufficient Funds Modal
      3.7 Paid Arena Modal
      3.8 Leaderboard Modal
      3.9 Game Stats Modal

   4. Utility Classes
      4.1 Spacing
      4.2 Text
      4.3 Colors
      4.4 Display
   ================================ */

/* ================================
   1. BASE MODAL FRAMEWORK
   ================================ */

/* 1.1 Container & Backdrop */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal.show,
.modal.modal-active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.closing {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none;
}

.modal.closing .modal-content {
    opacity: 1 !important;  /* Ensure visible during close animation */
    visibility: visible !important;  /* Keep visible during close */
    animation: modalSlideDown 0.3s ease-out forwards;
    pointer-events: none;
}

/* Fix for post-game modal specific positioning */
#postGameModal.modal-active .modal-content,
#postGameModal.closing .modal-content {
    margin: 0 auto;
}

/* Post-game modal specific hiding to prevent flashing */
#postGameModal {
    display: none !important;
}

#postGameModal.modal-active,
#postGameModal.closing {
    display: flex !important;
}

#postGameModal .modal-content {
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.95);
}

#postGameModal.modal-active .modal-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Hide empty post-game modal content */
#postGameModal .modal-content:empty {
    display: none !important;
}

.modal-content {
    background: linear-gradient(135deg, rgba(40, 30, 70, 0.95), rgba(20, 20, 40, 0.98));
    border: 1px solid rgba(80, 227, 194, 0.3);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(80, 227, 194, 0.05);
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    color: #fff;
    /* Animation removed from here - will be applied only when modal-active */
}

/* Show and animate when modal is actively being shown */
.modal.modal-active .modal-content,
.modal.show .modal-content {
    animation: modalSlideUp 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

/* 1.3 Animations */
@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalSlideDown {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
}

@keyframes confettiFall {
    0% {
        top: -20px;
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        top: 110%;
        transform: translateX(calc(var(--random-x) * 200px - 100px)) rotate(360deg);
        opacity: 0;
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    z-index: 10;
}

.close-modal:hover {
    color: #50e3c2;
    transform: rotate(90deg);
    text-shadow: 0 0 10px rgba(80, 227, 194, 0.5);
}

/* ================================
   2. COMMON COMPONENTS
   ================================ */

/* 2.1 Headers & Titles */
.modal-title {
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, #4a90e2, #50e3c2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 5px rgba(80, 227, 194, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.modal-title img {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.modal-title-danger {
    background: linear-gradient(90deg, #ff4444, #ff6b6b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 5px rgba(255, 68, 68, 0.3));
}

.modal-description {
    text-align: center;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.modal-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.modal-section-danger {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.1), rgba(255, 107, 107, 0.05));
    border: 1px solid rgba(255, 68, 68, 0.3);
}

.modal-section-title {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

/* --- Buttons --- */
.modal-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-btn-primary {
    background: linear-gradient(135deg, #50e3c2, #4a90e2);
    color: #fff;
    box-shadow: 0 4px 15px rgba(80, 227, 194, 0.3);
}

.modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(80, 227, 194, 0.5);
}

.modal-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.modal-btn-success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}
.modal-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.modal-btn-warning {
    background: linear-gradient(135deg, #ff9800, #ff6b00);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}
.modal-btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

.modal-btn-danger {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.15), rgba(233, 30, 99, 0.1));
    color: #ff6b6b;
    border: 1px solid rgba(244, 67, 54, 0.4);
    padding: 0.875rem 2rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}
.modal-btn-danger:hover {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.25), rgba(233, 30, 99, 0.2));
    color: #ff5252;
    border-color: rgba(244, 67, 54, 0.6);
    transform: translateY(-2px);
}

.modal-btn:disabled {
    background: linear-gradient(135deg, #666, #444);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.modal-btn-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* --- Form Inputs --- */
.modal-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.modal-input:focus {
    outline: none;
    border-color: #50e3c2;
    background: rgba(0, 0, 0, 0.3);
}

.modal-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.modal-input:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    background: rgba(255, 255, 255, 0.05);
}

/* --- Notice/Info Boxes --- */
.notice-box {
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: left;
}

.notice-box-warning {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.notice-box-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.notice-box-warning .notice-box-title {
    color: #ff9800;
}

/* --- Specific Modal Overrides (migrated from inline styles) --- */

/* Paid Arena Modal */
.paid-features-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.paid-feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.paid-feature-item i {
    color: #50e3c2;
    font-size: 1.1rem;
    filter: drop-shadow(0 0 5px rgba(80, 227, 194, 0.5));
}

/* Wallet Modal */
.wallet-balance-display {
    text-align: center;
    margin-bottom: 0.5rem;
}

.wallet-balance-amount {
    font-size: 3rem;
    font-weight: 900;
    color: #50e3c2;
    text-shadow: 0 0 20px rgba(80, 227, 194, 0.3);
}

.wallet-address-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wallet-address-box:hover {
    background: rgba(74, 144, 226, 0.1);
    border-color: #4a90e2;
}

.wallet-icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #627EEA, #4A5EE2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

/* Leaderboard Modal */
.leaderboard-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.arena-toggle {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.arena-toggle button {
    flex: 1;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.arena-toggle button.active {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.3), rgba(80, 227, 194, 0.2));
    color: #50e3c2;
    border-color: rgba(80, 227, 194, 0.3);
}

.period-selector select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
}

.leaderboard-info {
    text-align: center;
    margin: 1rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(80, 227, 194, 0.05));
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 12px;
}

.leaderboard-info-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    color: #50e3c2;
    font-size: 1.1rem;
    font-weight: 600;
}

.leaderboard-info-title img {
    width: 24px;
    height: 24px;
}

.leaderboard-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin: 0;
}

.leaderboard-entries-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.leaderboard-placeholder,
.loading-placeholder {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.6);
}

.leaderboard-placeholder i {
    font-size: 2.5rem;
    opacity: 0.5;
    margin-bottom: 1rem;
    display: block;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.leaderboard-entry-gold {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    border-color: rgba(255, 215, 0, 0.5);
}

.leaderboard-entry-silver {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(192, 192, 192, 0.1));
    border-color: rgba(192, 192, 192, 0.5);
}

.leaderboard-entry-bronze {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(205, 127, 50, 0.1));
    border-color: rgba(205, 127, 50, 0.5);
}

.leaderboard-entry-current-user {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.25), rgba(80, 227, 194, 0.15));
    border: 2px solid rgba(80, 227, 194, 0.8);
    box-shadow: 0 0 15px rgba(80, 227, 194, 0.3);
}

.leaderboard-entry-current-user::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: linear-gradient(180deg, #50e3c2, #4a90e2);
    border-radius: 2px;
}

.leaderboard-rank {
    font-weight: bold;
    width: 40px;
    text-align: center;
}

.leaderboard-entry-gold .leaderboard-rank { font-size: 1.4rem; color: gold; }
.leaderboard-entry-silver .leaderboard-rank { font-size: 1.3rem; color: silver; }
.leaderboard-entry-bronze .leaderboard-rank { font-size: 1.2rem; color: #cd7f32; }

.leaderboard-name {
    flex: 1;
    margin-left: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.leaderboard-entry-current-user .leaderboard-name {
    font-weight: 600;
    color: #50e3c2;
}

.user-tag {
    background: rgba(80, 227, 194, 0.9);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.leaderboard-score {
    font-weight: bold;
}

.earnings-positive { color: #44ff44; }
.earnings-negative { color: #ff4444; }

.current-user-rank-container {
    margin: 1rem 0;
    padding: 0.75rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.current-user-rank-title {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

/* Championship Status Indicator */
.championship-status {
    text-align: center;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    animation: pulse 2s ease-in-out infinite;
}

.championship-status.active {
    background: linear-gradient(135deg, #ff4458, #ff6b6b);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 68, 88, 0.4);
}

.championship-status.inactive {
    background: linear-gradient(135deg, #4a5568, #2d3748);
    color: rgba(255, 255, 255, 0.8);
}

.championship-status .time-info {
    display: block;
    font-size: 0.85rem;
    font-weight: normal;
    opacity: 0.9;
    margin-top: 0.25rem;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Profile Modal */
.profile-unauthenticated {
    text-align: center;
    padding: 2rem 1rem;
}

.guest-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.3), rgba(73, 80, 87, 0.2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(108, 117, 125, 0.4);
}

.guest-avatar i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.6);
}

.guest-title {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.guest-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.profile-header {
    padding: 1.75rem;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.15), rgba(80, 227, 194, 0.1));
    border-radius: 16px;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 1.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a90e2, #50e3c2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    position: relative;
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.3);
    flex-shrink: 0;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.provider-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 26px;
    height: 26px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.provider-icon i {
    font-size: 13px;
}

.profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0.25rem;
}

.username-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    margin-bottom: 0.5rem;
}

.display-username {
    margin: 0;
    font-size: 1.75rem;
    color: white;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
}

.edit-username-btn {
    background: rgba(80, 227, 194, 0.1);
    border: 1px solid rgba(80, 227, 194, 0.2);
    color: #50e3c2;
    padding: 0.3rem 0.65rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.65rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: 28px;
}

.edit-username-btn i {
    font-size: 0.6rem;
}

.edit-username-btn span {
    line-height: 1;
}

.username-edit-container {
    display: none;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 0.5rem;
}

.username-edit-container .username-input {
    width: auto;
    flex: 1;
    height: 36px;
    margin: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
}

.edit-username-btn:hover {
    background: rgba(80, 227, 194, 0.25);
    transform: translateY(-1px);
}


.wallet-address {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.65rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.65);
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-weight: 500;
    letter-spacing: 0.025em;
    transition: all 0.2s;
    width: fit-content;
    margin: 0;
}

.wallet-address i {
    font-size: 0.75rem;
}

.profile-info .wallet-address i {
    color: #4a90e2;
    font-size: 0.75rem;
}

.wallet-address:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}

.profile-actions {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}


.form-error {
    display: none;
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.form-success {
    color: #50e3c2;
}

/* Referral Section in Profile Modal */
.referral-section {
    background: linear-gradient(135deg, rgba(80, 227, 194, 0.05), rgba(74, 144, 226, 0.05));
    padding: 1.25rem;
    border-radius: 10px;
    border: 1px solid rgba(80, 227, 194, 0.2);
    margin: 1.5rem 0;
}

.referral-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #50e3c2;
    font-weight: 600;
    font-size: 1rem;
}

.referral-header i {
    font-size: 1.1rem;
}

.referral-code-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.referral-link-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.referral-link-input {
    flex: 1;
    padding: 0.6rem 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    font-family: monospace;
    outline: none;
    transition: all 0.3s;
}

.referral-link-input:focus {
    border-color: rgba(80, 227, 194, 0.5);
    background: rgba(0, 0, 0, 0.4);
}

.copy-link-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, #50e3c2, #4a90e2);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.copy-link-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(80, 227, 194, 0.3);
}

.copy-link-btn:active {
    transform: translateY(0);
}

.copy-success {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4CAF50;
    font-size: 0.85rem;
    padding: 0.5rem 0;
    animation: fadeIn 0.3s ease;
}

.copy-success i {
    font-size: 1rem;
}

.referral-count {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.referral-count i {
    margin-right: 0.5rem;
    color: #50E3C2;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Wallet Settings Modal */
.self-custody-badge {
    background: linear-gradient(135deg, rgba(80, 227, 194, 0.1), rgba(74, 144, 226, 0.05));
    padding: 1rem 1.25rem;
    border-radius: 10px;
    border: 1px solid rgba(80, 227, 194, 0.3);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.self-custody-badge-icon i {
    color: #50e3c2;
    font-size: 1.3rem;
    margin-top: 0.2rem;
}

.self-custody-badge-info {
    flex: 1;
}

.self-custody-badge-title {
    color: #50e3c2;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.self-custody-badge-description {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.self-custody-badge-features {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    line-height: 1.4;
}

.wallet-details-grid {
    margin-bottom: 1.5rem;
}

.info-card {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(80, 227, 194, 0.05));
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.info-card-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.address-display {
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 0.5rem;
    font-family: monospace;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.copy-btn {
    background: transparent;
    border: none;
    color: #4a90e2;
    cursor: pointer;
    padding: 0.25rem;
    transition: all 0.2s;
}

.copy-btn:hover {
    color: #50e3c2;
    transform: scale(1.1);
}

.auth-section {
    margin-bottom: 1rem;
}

.auth-status-authorized {
    color: #4caf50;
}
.auth-status-authorized i {
    margin-right: 0.5rem;
}

.auth-status-unauthorized {
    color: #f44336;
}
.auth-status-unauthorized i {
    margin-right: 0.5rem;
}

.notice-box-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}
.notice-box-description span:last-child {
    color: #ff9800;
}

.form-feedback {
    display: none;
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid;
    font-size: 0.85rem;
    text-align: center;
}

.form-feedback-success {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.5);
    color: #4caf50;
}

.form-feedback-error {
    background: rgba(244, 67, 54, 0.2);
    border-color: rgba(244, 67, 54, 0.5);
    color: #f44336;
}

/* Game Stats Modal */
.rank-badge-container {
    text-align: center;
    margin: 1.5rem 0;
}


.rank-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    color: white;
}

.rank-badge i {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.rank-badge span {
    font-size: 1.1rem;
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.25rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card-blue {
    background: linear-gradient(145deg, rgba(74, 144, 226, 0.15), rgba(80, 227, 194, 0.1));
    border: 1px solid rgba(74, 144, 226, 0.3);
}

.stat-card-red {
    background: linear-gradient(145deg, rgba(244, 67, 54, 0.15), rgba(233, 30, 99, 0.1));
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.stat-card-glow {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05), transparent);
    border-radius: 50%;
}

.stat-card-content {
    position: relative;
    z-index: 2;
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 0.75rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card-blue .stat-card-icon {
    background: linear-gradient(45deg, #4a90e2, #50e3c2);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.stat-card-red .stat-card-icon {
    background: linear-gradient(45deg, #F44336, #E91E63);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.stat-card-icon i {
    font-size: 1rem;
    color: white;
}

.stat-card-title {
    font-size: 0.7rem;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
}

.stat-card-blue .stat-card-title { color: #4a90e2; }
.stat-card-red .stat-card-title { color: #F44336; }

.stat-card-value {
    color: white;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
}

.secondary-stats-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.secondary-stat-card {
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    transition: all 0.3s ease;
}

.secondary-stat-card-purple {
    background: linear-gradient(145deg, rgba(156, 39, 176, 0.15), rgba(103, 58, 183, 0.1));
    border: 1px solid rgba(156, 39, 176, 0.3);
}

.secondary-stat-card-teal {
    background: linear-gradient(145deg, rgba(0, 188, 212, 0.15), rgba(0, 150, 136, 0.1));
    border: 1px solid rgba(0, 188, 212, 0.3);
}

.secondary-stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.secondary-stat-card-purple .secondary-stat-card-icon {
    background: linear-gradient(45deg, #9C27B0, #673AB7);
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.3);
}

.secondary-stat-card-teal .secondary-stat-card-icon {
    background: linear-gradient(45deg, #00BCD4, #009688);
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.3);
}

.secondary-stat-card-icon i {
    font-size: 1rem;
    color: white;
}

.secondary-stat-card-info {
    flex: 1;
    min-width: 0;
}

.secondary-stat-card-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
}

.secondary-stat-card-purple .secondary-stat-card-title { color: #9C27B0; }
.secondary-stat-card-teal .secondary-stat-card-title { color: #00BCD4; }

.secondary-stat-card-value {
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    margin-top: 0.25rem;
}

/* Settings Modal */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
}


.settings-category {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.08), rgba(80, 227, 194, 0.05));
    border: 1px solid rgba(80, 227, 194, 0.2);
    border-radius: 12px;
    padding: 0.875rem;
    position: relative;
    overflow: hidden;
}

.settings-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #4a90e2, #50e3c2);
    opacity: 0.6;
}

.settings-category-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 0.4rem;
    transition: background 0.2s;
}

.setting-row:last-child {
    margin-bottom: 0;
}

.setting-row:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(80, 227, 194, 0.3);
    transform: translateY(-1px);
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

.setting-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

/* Custom Toggle Switch */
.pref-toggle {
    display: none;
}

.toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 11px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
}


.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="checkbox"]:checked + .toggle-switch {
    background: linear-gradient(135deg, #4a90e2, #50e3c2);
    border-color: transparent;
}

input[type="checkbox"]:checked + .toggle-switch::after {
    transform: translateX(18px);
}

/* Mobile Responsive */
@media (max-width: 1000px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .wallet-balance-amount {
        font-size: 2.5rem;
    }
}

@media (min-width: 480px) {
    .secondary-stats-list {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 479px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .profile-header .profile-avatar {
        margin: 0 auto;
    }
}

/* ================================
   Wallet Modal Specific Classes
   ================================ */

.wallet-modal-icon {
    width: 40px;
    height: 40px;
}

.wallet-balance-display {
    text-align: center;
    margin: 1rem 0;
}

.wallet-balance-display .currency-symbol {
    font-size: 2.8rem;
    font-weight: bold;
    color: #50e3c2;
}

.wallet-balance-amount {
    font-size: 2.8rem;
    font-weight: bold;
    color: #fff;
}

.wallet-balance-unit {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.5rem;
}

/* Wallet Address Box */
.wallet-address-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(80, 227, 194, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 0.75rem 0;
    transition: all 0.3s ease;
}

.wallet-address-box.clickable {
    cursor: pointer;
}

.wallet-address-box.clickable:hover {
    background: rgba(80, 227, 194, 0.05);
    border-color: rgba(80, 227, 194, 0.5);
    transform: translateY(-2px);
}

.wallet-address-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wallet-icon-circle {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.wallet-icon-circle img {
    width: 100%;
    height: 100%;
    filter: brightness(0) invert(1);
}

.wallet-address-info {
    text-align: left;
    flex: 1;
}

.wallet-chain-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.2rem;
}

.wallet-address-text {
    font-family: monospace;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

.copy-feedback {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: rgba(80, 227, 194, 0.8);
}

/* Authorization Key Section */
.auth-key-section {
    text-align: center;
    line-height: 1.6;
}

.auth-key-message {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.auth-key-info {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
    line-height: 1.4;
    text-align: center;
}

.auth-key-details {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    display: block;
    margin-bottom: 1rem;
}

#auth-key-status {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    display: none;
}

#auth-key-status.visible {
    display: block;
}

/* Transaction Status */
#transaction-status {
    display: none;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    font-size: 0.85rem;
}

#transaction-status.visible {
    display: block;
}

/* Wallet Footer Text */
.wallet-footer-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-top: 1.5rem;
    text-align: center;
}

/* Withdrawal Section */
.withdraw-section {
    text-align: center;
}

.withdraw-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #ff9800;
}

.withdraw-balance {
    font-size: 1.5rem;
    font-weight: bold;
    color: #50e3c2;
}

.withdraw-progress {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.withdraw-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.withdraw-progress-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.withdraw-progress-count {
    font-size: 0.9rem;
    color: #ff9800;
    font-weight: bold;
}

.withdraw-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.withdraw-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff9800, #ff6b00);
    transition: width 0.3s ease;
}

.withdraw-no-funds {
    color: rgba(255, 255, 255, 0.6);
    margin: 1rem 0;
}

.withdraw-info {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    display: block;
    margin-top: 0.5rem;
}

/* Authorization Response Styles */
.auth-response {
    text-align: left;
    line-height: 1.6;
}

.auth-response-detail {
    display: block;
    margin-top: 0.5rem;
}

/* Status Messages */
.status-success-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #4caf50;
}

.status-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.status-details {
    color: rgba(255, 255, 255, 0.7);
    display: block;
    margin-bottom: 0.75rem;
}

.status-link {
    color: #4a90e2;
    text-decoration: underline;
    font-size: 0.85rem;
}

.status-error-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.status-info-text {
    color: rgba(255, 255, 255, 0.6);
}

/* Withdrawal Specific */
.withdraw-form-group {
    margin-bottom: 1rem;
}

.withdraw-cancel-btn {
    margin-top: 1rem;
}

/* ================================
   Settings Modal Specific Classes
   ================================ */

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
    margin-bottom: 0;
}

.settings-category-title i {
    margin-right: 0.5rem;
}

.settings-category-title .fa-eye {
    color: #4a90e2;
}

.settings-category-title .fa-headphones {
    color: #E91E63;
}

.settings-column {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pref-toggle {
    display: none !important;
}

.setting-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.setting-icon i {
    color: white;
}

.setting-icon-dark {
    background: linear-gradient(135deg, #FFC107, #FF9800);
}

.setting-icon-border {
    background: linear-gradient(135deg, #2196F3, #03A9F4);
}

.setting-icon-grid {
    background: linear-gradient(135deg, #9C27B0, #673AB7);
}

.setting-icon-continuity {
    background: linear-gradient(135deg, #00BCD4, #009688);
}

.setting-icon-mass {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
}

.setting-icon-fps {
    background: linear-gradient(135deg, #FF5722, #FF6E40);
}

.setting-icon-sound {
    background: linear-gradient(135deg, #E91E63, #F06292);
}

.setting-icon-music {
    background: linear-gradient(135deg, #3F51B5, #5C6BC0);
}

/* Settings Footer */
.settings-footer {
    text-align: center;
    margin-top: 0.875rem;
    padding-top: 0.875rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.settings-footer-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    display: block;
    margin-bottom: 0.875rem;
}

.settings-footer-text a {
    color: #4a90e2;
    text-decoration: underline;
}

/* ================================
   Common Modal Classes
   ================================ */

.amount-highlight {
    color: #50e3c2;
}

.modal-section-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    margin: 0;
}

.modal-footer {
    text-align: center;
}

.modal-footer-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.me-2 {
    margin-right: 0.5rem;
}

.modal-btn-compact {
    width: auto;
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
}

.settings-footer .modal-btn-compact {
    margin: 0 auto;
}

/* Provider icon colors */
.provider-icon[data-provider-color] {
    color: var(--provider-color);
}

/* Set provider colors as CSS variables */
[data-provider-color="#4285F4"] { --provider-color: #4285F4; }
[data-provider-color="#5865F2"] { --provider-color: #5865F2; }
[data-provider-color="#1DA1F2"] { --provider-color: #1DA1F2; }
[data-provider-color="#4a90e2"] { --provider-color: #4a90e2; }

.mb-4 {
    margin-bottom: 1rem;
}

.modal-signup-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.modal-signup-link {
    color: #50e3c2;
    text-decoration: none;
    font-weight: 500;
}

.modal-signup-link:hover {
    text-decoration: underline;
}

/* ================================
   3.3 CASH OUT MODAL
   ================================ */

.cash-out-modal .modal-content {
    max-width: 500px;
}

.cash-out-balance {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(80, 227, 194, 0.05));
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 12px;
}

.cash-out-balance-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    color: #50e3c2;
    font-size: 1.1rem;
    font-weight: 600;
}

.cash-out-balance-title img {
    width: 24px;
    height: 24px;
}

.cash-out-balance-amount {
    font-size: 2rem;
    font-weight: bold;
    color: #50e3c2;
    margin: 0.5rem 0;
}

.cash-out-balance p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin: 0;
}

.cash-out-form {
    margin-top: 1.5rem;
}

.cash-out-form .form-group {
    margin-bottom: 1rem;
}

.cash-out-form .form-group.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.cash-out-form .form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    text-align: left;
}

.amount-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.progress-bar-container {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-bar-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.progress-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, #ff9800, #ff6b00);
    transition: width 0.3s ease;
}

.form-validation-feedback {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    height: 1rem;
}

.form-validation-feedback .fa-check-circle { color: #4caf50; }
.form-validation-feedback .fa-times-circle { color: #f44336; }
.form-validation-feedback span { margin-left: 0.25rem; }

.form-footer-note {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    text-align: center;
    margin-top: 1rem;
}

.modal-input.input-valid {
    border-color: #4caf50;
}

.modal-input.input-invalid {
    border-color: #f44336;
}

.form-validation-feedback.feedback-valid {
    color: #4caf50;
}

.form-validation-feedback.feedback-invalid {
    color: #f44336;
}

.form-feedback-info {
    border-color: rgba(74, 144, 226, 0.5);
    color: #4a90e2;
}

.feedback-content {
    text-align: center;
}

.feedback-content i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.feedback-content strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.feedback-content small {
    color: rgba(255, 255, 255, 0.7);
    display: block;
    margin-bottom: 0.75rem;
}

.feedback-link {
    color: #4a90e2;
    text-decoration: underline;
    font-size: 0.85rem;
}

/* ================================
   3.4 POST GAME MODAL
   ================================ */

.post-game-container {
    padding: 1.5rem;
    position: relative;
    text-align: center;
}

.post-game-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease, background 0.3s ease, transform 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10;
}

.post-game-close:hover {
    color: rgba(255, 255, 255, 0.9);
    transform: rotate(90deg);
    background: rgba(255, 255, 255, 0.1);
}

.modal.closing .post-game-close {
    transition: none;
    pointer-events: none;
}

.post-game-header {
    margin-bottom: 1rem;
}

.post-game-icon {
    font-size: 3rem;
}

.post-game-icon.winner {
    color: #FFD700;
}

.post-game-icon.retry {
    color: #ff4757;
}

.post-game-title {
    margin: 0.25rem 0;
    font-size: 1.75rem;
}

.post-game-title.winner {
    color: #FFD700;
}

.post-game-title.retry {
    color: #ff4757;
}

.wallet-change-section {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.wallet-change-section.positive {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(46, 125, 50, 0.1));
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.wallet-change-section.negative {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.15), rgba(198, 40, 40, 0.1));
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.wallet-change-main {
    flex: 1;
}

.wallet-change-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wallet-change-section.positive .wallet-change-title {
    color: #4CAF50;
}

.wallet-change-section.negative .wallet-change-title {
    color: #ff4757;
}

.wallet-change-icon {
    font-size: 1rem;
}

.wallet-change-amount {
    font-size: 2.25rem;
    margin: 0;
    font-weight: bold;
}

.wallet-change-section.positive .wallet-change-amount {
    color: #4CAF50;
}

.wallet-change-section.negative .wallet-change-amount {
    color: #ff4757;
}

.wallet-change-breakdown {
    text-align: right;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.breakdown-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.25rem;
}

.breakdown-item {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.positive-text {
    color: #4CAF50;
}

.negative-text {
    color: #ff4757;
}

.breakdown-score-value {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.payout-status-section {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.payout-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.payout-status.processing { color: rgba(255, 255, 255, 0.8); }
.payout-status.success { color: #4CAF50; }
.payout-status.skipped { color: rgba(255, 255, 255, 0.6); }
.payout-status.failed { color: #ff4757; }
.payout-status.timeout { color: #ffa500; }

.payout-icon {
    font-size: 1rem;
}

.payout-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.post-game-stats {
    padding: 1rem;
    margin-bottom: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
}

.stat-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.stat-value.highlight {
    color: #50e3c2;
}

.post-game-actions {
    display: flex;
    gap: 1rem;
}

.btn-rejoin,
.btn-another-arena {
    flex: 1;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-rejoin {
    background: linear-gradient(135deg, #50e3c2, #4a90e2);
    color: #fff;
    box-shadow: 0 4px 15px rgba(80, 227, 194, 0.3);
}

.btn-rejoin:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(80, 227, 194, 0.5);
}

.btn-another-arena {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-another-arena:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10001;
    overflow: hidden;
}

.confetti-particle {
    position: absolute;
    top: -20px;
    border-radius: 50%;
    animation: confettiFall 3s linear forwards;
}

/* Mobile Responsive Styles for Post-Game Modal */
@media (max-width: 1000px) {
    .post-game-icon { font-size: 2.5rem; }
    .post-game-title { font-size: 1.25rem; }
    .post-game-container { padding: 1rem; }
    .post-game-header { margin-bottom: 0.5rem; }
    .post-game-close { right: 0.5rem; top: 0.5rem; font-size: 1.25rem; width: 25px; height: 25px; }
    .wallet-change-section { padding: 0.75rem; margin-bottom: 0.75rem; gap: 0.5rem; }
    .wallet-change-title { font-size: 0.65rem; margin-bottom: 0.25rem; }
    .wallet-change-icon { font-size: 0.9rem; }
    .wallet-change-amount { font-size: 1.75rem; }
    .post-game-stats { padding: 0.75rem; margin-bottom: 0.75rem; }
    .stats-grid { gap: 0.5rem; }
    .stat-item { padding: 0.4rem; }
    .stat-label { font-size: 0.6rem; }
    .stat-value { font-size: 0.9rem; }
}

/* ================================
   CUSTOM FUNDING MODAL (Aligned with Cash Out Modal)
   ================================ */

.custom-funding-modal .modal-content {
    background: linear-gradient(135deg, #1a1a2e, #2a2a3e);
    border: 1px solid rgba(74, 144, 226, 0.3);
}

/* Balance Display - Matching cash-out-balance */
.add-funds-balance {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(99, 179, 237, 0.05));
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.add-funds-balance-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.add-funds-balance-title img {
    width: 20px;
    height: 20px;
}

.add-funds-balance-amount {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #4a90e2, #63b3ed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 10px 0;
}

.add-funds-balance p {
    color: #6b7280;
    font-size: 12px;
    margin: 0;
}

/* Form Section - Matching cash-out-form */
.add-funds-form {
    margin-top: 0;
}

.add-funds-form .form-group {
    margin-bottom: 20px;
}

.add-funds-form .form-group label {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* QR Code Section */
.qr-section {
    display: flex;
    justify-content: center;
    margin: 25px 0;
}

.qr-container {
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: inline-block;
}

.qr-container img {
    width: 180px;
    height: 180px;
    display: block;
    image-rendering: pixelated;
}

/* Wallet Address Container */
.wallet-address-container {
    position: relative;
    display: flex;
    align-items: stretch;
    cursor: pointer;
}

.wallet-address-container .modal-input {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    padding-right: 50px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(74, 144, 226, 0.3);
    color: #ffffff;
}

.wallet-address-container:hover .modal-input {
    border-color: rgba(74, 144, 226, 0.6);
    background: rgba(74, 144, 226, 0.05);
}

.copy-btn {
    position: absolute;
    right: 1px;
    top: 1px;
    bottom: 1px;
    background: linear-gradient(135deg, #4a90e2, #63b3ed);
    border: none;
    padding: 10px 15px;
    border-radius: 0 8px 8px 0;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.copy-btn:hover {
    background: linear-gradient(135deg, #63b3ed, #4a90e2);
}

.copy-icon {
    font-size: 14px;
}

/* Footer Note - Matching form-footer-note */
.add-funds-form .form-footer-note {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 12px;
    font-size: 12px;
    color: #ffc107;
    text-align: center;
    margin-top: 20px;
}

.add-funds-form .form-footer-note i {
    margin-right: 6px;
}

/* Notice Box Info Variant */
.notice-box-info {
    background: rgba(74, 144, 226, 0.1);
    border-color: rgba(74, 144, 226, 0.3);
}

.notice-box-info .notice-box-title {
    color: #4a90e2;
}