:root {
    --gold-gradient: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
    --color-primary: #ffc107;
    --text-muted: #999;
    --radius-md: 12px;
    --border-color: rgba(255, 255, 255, 0.1);
}

/* Remove spinner arrows from number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Custom Input Errors */
.input-error-msg {
    color: #ff4444;
    font-size: 0.72rem;
    margin-top: 4px;
    margin-left: 4px;
    font-weight: 600;
    line-height: 1.2;
}

.red-shake {
    animation: errorShake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes errorShake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-3px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(3px, 0, 0);
    }
}

.input-error {
    border-color: #ff4444 !important;
    background: rgba(244, 67, 54, 0.05) !important;
}

/* UI Cleanup: Classes to replace inline styles */
.bet-price-notice {
    color: var(--color-primary);
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
}

.modal-close-round {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close-round:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.modal-close-round:active {
    transform: scale(0.95);
}

/* History & Result Cards Styling */
.card-expandable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-card-icon-container {
    background: #fff;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 6px;
    flex-shrink: 0;
}

.detail-row-column {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px;
    margin-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
}

.uppercase {
    text-transform: uppercase;
}

.text-gold {
    color: var(--text-gold);
}

.numbers-scroll-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.number-badge-detail {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
}

.prize-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.prize-number {
    margin-left: 8px;
    font-family: 'JetBrains Mono', monospace;
    color: #10b981;
}

.winner-row {
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.winner-name-text {
    font-size: 0.85rem;
    color: #fff;
    font-weight: 600;
}

.winner-modality {
    font-size: 0.65rem;
    color: #fbbf24;
    font-weight: 800;
    margin-top: 1px;
}

.winner-prize-amount {
    font-size: 0.85rem;
    color: #10b981;
    font-weight: bold;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

/* Premium Stepper UI */
.premium-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-top: 10px;
    gap: 15px;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.2);
    min-height: 80px;
    /* Ensure it's not empty/collapsed */
}

.stepper-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: none;
    background: var(--gold-gradient);
    color: #000;
    font-size: 1.8rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
    user-select: none;
    /* Prevent text selection */
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    /* Clean mobile tap */
}

.stepper-btn:active {
    transform: scale(0.85);
}

.stepper-btn:disabled {
    background: #2a2a2a;
    color: #555;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.5;
}

.stepper-value-container {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    min-width: 80px;
}

.stepper-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--color-primary);
    line-height: 1;
    text-shadow: 0 0 15px rgba(255, 193, 7, 0.4);
}

.stepper-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 6px;
    font-weight: 700;
}

/* Bet Amount Input Hidden but functional */
#bet-amount.stepper-hidden {
    display: none !important;
}

.input-group#milhar-stepper-container {
    margin-bottom: 25px;
}


/* Loading State Pulse */
.loading-data .animal-card {
    position: relative;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.7;
}

.loading-data .animal-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.05) 50%,
            transparent 100%);
    animation: loading-pulse 1.5s infinite;
}

@keyframes loading-pulse {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(50%);
    }
}

/* Sold Out Enhanced */
.animal-card.sold-out:hover {
    transform: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6) !important;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #3e2723;
    /* Dark text for contrast on gold */
    color: #3e2723;
    /* Dark text for contrast on gold */
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    /* Soft glow instead of block */
}

.btn-primary:active {
    transform: scale(0.95);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
}

.btn-full {
    width: 100%;
}

.btn-large {
    padding: 1rem;
    font-size: 1rem;
}

/* Google Button */
.btn-google {
    background: #fff;
    color: #3c4043;
    border: 1px solid #dadce0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 500;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #d2d3d4;
}

.btn-google svg {
    flex-shrink: 0;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: var(--spacing-md) 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
    padding: 0 var(--spacing-sm);
}


/* Inputs */
.input-group {
    margin-bottom: var(--spacing-md);
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.input-group input {
    width: 100%;
    padding: 12px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
}

.input-group input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(0, 230, 118, 0.1);
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    flex: 1;
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.toggle-password:hover {
    color: var(--color-primary);
}


/* Animal Card - Premium Redesign */
.animal-card {
    background-color: #2e2b28;
    /* Dark Grayish Beige */
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-md);
    text-align: center;
    border: none;
    /* Remove physical border to use ::before frame */
    transition: var(--transition-fast);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    /* Contain the pseudo-border and badge */
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    /* Fix ID badge overflow at rounded corners */
}

/* Border Frame Overlay (The "Corda") - Metallic Gradient */
.animal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 3px;
    /* Thickness */
    border-radius: var(--radius-md);
    background: var(--gold-gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    z-index: 5;
    pointer-events: none;
    transition: var(--transition-fast);
}

/* Glow Shadow (Separate for better control) */
.animal-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-md);
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.4), inset 0 0 5px rgba(255, 193, 7, 0.2);
    z-index: 4;
    pointer-events: none;
    transition: var(--transition-fast);
}

/* Golden frame on hover or select */
.animal-card:hover::before {
    background: linear-gradient(135deg, #ffeb3b 0%, #ffc107 50%, #ffeb3b 100%);
}

.animal-card:hover::after {
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.6), inset 0 0 10px rgba(255, 193, 7, 0.3);
}

.animal-card:hover .number {
    background: linear-gradient(135deg, #ffeb3b 0%, #ffc107 50%, #ffeb3b 100%);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.6);
}

.animal-card.selected::before {
    background: var(--gold-gradient) !important;
}

.animal-card.selected::after {
    box-shadow: 0 0 25px rgba(255, 193, 7, 0.25);
}

.animal-card.selected {
    background-color: rgba(255, 193, 7, 0.05);
}

.animal-card .number {
    font-size: 0.7rem;
    color: #3e2723;
    font-weight: 800;
    position: absolute;
    top: 1px;
    right: 1px;
    background: var(--gold-gradient);
    /* Metallic effect */
    padding: 3px 10px;
    border-radius: 0 var(--radius-md) 0 var(--radius-sm);
    /* Matches card radius perfectly */
    z-index: 1;
    /* Behind ::before border */
    transition: var(--transition-fast);
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.3);
}

/* Sold Out Specifics */
.animal-card.sold-out {
    cursor: not-allowed !important;
}

.animal-card.sold-out:hover::before {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 50%, #f87171 100%) !important;
}

.animal-card.sold-out:hover::after {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.7), inset 0 0 12px rgba(239, 68, 68, 0.4) !important;
}

.animal-card.sold-out::before {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 50%, #ef4444 100%) !important;
}

.animal-card.sold-out::after {
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5), inset 0 0 8px rgba(239, 68, 68, 0.3) !important;
}

.animal-card.sold-out .number {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
    color: #fff !important;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.animal-card.sold-out:hover .number {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 50%, #f87171 100%) !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
}

.animal-card .image-container {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    margin-top: 10px;
    /* Space for number badge */
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: transparent;
    position: relative;
    /* Context for shadow & glow */
}

/* Golden Glow Background */
.animal-card .image-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.3) 0%, transparent 70%);
    filter: blur(10px);
    z-index: 0;
    pointer-events: none;
}

/* Shadow under feet */
.animal-card .image-container::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    filter: blur(4px);
    z-index: 1;
    pointer-events: none;
}

.animal-img,
.animal-emoji-display {
    position: relative;
    z-index: 2;
}

.animal-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.6));
    transition: transform 0.3s ease;
}

.animal-card.selected .animal-img {
    transform: scale(1.1);
}

.animal-emoji-display {
    font-size: 3.5rem;
    line-height: 1;
    display: block;
    filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.4));
    transition: transform 0.3s ease;
}

.animal-card .name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}

.group-numbers {
    font-size: 0.75rem;
    color: var(--text-gold);
    font-weight: 600;
    letter-spacing: 1px;
}

/* Screen Management */
.app-screen {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Content Lists (Bets & Results) */
.content-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) 0;
}

.empty-state {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
    font-style: italic;
}

/* Profile Card */
/* Profile Redesign: Minimalist & Professional */
.profile-balance-summary {
    background: rgba(255, 255, 255, 0.05);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--border-color);
}

.profile-balance-summary .label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 4px;
}

.profile-balance-summary .value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-primary);
}

.profile-group {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.profile-group .group-header {
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.profile-group .group-header h3 {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-group .section-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 480px) {
    .profile-info-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.profile-actions-bottom {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding: 0 var(--spacing-lg);
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid #ff4d4d;
    color: #ff4d4d;
    padding: 12px;
    border-radius: var(--radius-md);
    font-weight: 700;
    transition: var(--transition-fast);
}

.btn-outline-danger:hover {
    background: rgba(255, 77, 77, 0.1);
    transform: translateY(-2px);
}

.btn-danger {
    background: #d32f2f;
    border: 1px solid #d32f2f;
    color: #ffffff;
    padding: 12px;
    border-radius: var(--radius-md);
    font-weight: 700;
    transition: var(--transition-fast);
}

.btn-danger:hover {
    background: #b71c1c;
    border-color: #b71c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.status-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
    text-transform: uppercase;
    font-weight: 700;
}

.status-badge.active {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border-color: rgba(46, 204, 113, 0.3);
}

.mfa-steps {
    margin: var(--spacing-md) 0;
    padding-left: var(--spacing-lg);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.mfa-steps li {
    margin-bottom: 8px;
}

.mfa-qr-container {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin: var(--spacing-lg) auto;
    width: 200px;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#mfa-qr-code-img img {
    width: 150px;
    height: 150px;
}

.mfa-key-display {
    margin-top: var(--spacing-lg);
    background: rgba(0, 0, 0, 0.2);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    text-align: center;
}

.mfa-key-display .label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.mfa-key-display code {
    color: var(--color-primary);
    font-weight: 700;
    letter-spacing: 2px;
}

.readonly-field {
    background: rgba(255, 255, 255, 0.02) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed;
    border-style: dashed !important;
}

.action-row {
    display: flex;
    gap: var(--spacing-sm);
}

.action-row button {
    flex: 1;
}

.stat-item .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.stat-item .value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* Result Items - MOVED TO history-cards.css */
/* .result-card {
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    gap: var(--spacing-md);
} */

.result-card .winner-animal {
    width: 50px;
    height: 50px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-card .winner-info {
    flex: 1;
}

.result-card .winner-name {
    font-weight: 600;
    color: var(--text-primary);
}

.result-card .winner-user {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.margin-top-md {
    margin-top: var(--spacing-md);
}

/* Bet Modal Specific Styles */

/* New Layout Container */
.bet-modal-layout {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.bet-animal-display {
    flex: 0 0 120px;
    margin-bottom: 0;
    /* Remove old margin */
}

/* Vertical Selector */
.bet-type-selector {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: var(--spacing-sm);
    margin-bottom: 0;
}

.type-btn {
    width: 100%;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 600;
    transition: var(--transition-fast);
}

.type-btn.active {
    background: rgba(255, 193, 7, 0.1);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.type-btn:disabled,
.type-btn.disabled {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #666 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    cursor: not-allowed !important;
    opacity: 0.6;
    filter: grayscale(1);
    pointer-events: none;
}

.type-btn span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
}

.bet-summary {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-md);
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-md);
    font-size: 0.9rem;
}

.bet-summary span:last-child {
    color: var(--color-primary);
    font-weight: 700;
}

.input-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.input-optional-tag {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
}

/* Wallet Pill (Header) */
.wallet-pill {
    background-color: var(--bg-card);
    border: 1px solid var(--color-primary);
    border-radius: 20px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.1);
}

.wallet-pill .value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}


/* Deposit UI */
.deposit-presets {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.preset-btn {
    flex: 1;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--color-primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.preset-btn:hover {
    background: var(--bg-input);
    border-color: var(--color-primary);
}

.preset-btn.active {
    background: var(--gold-gradient);
    color: #000;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.pix-area {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: rgba(255, 193, 7, 0.05);
    border: 1px dashed var(--color-primary);
    border-radius: var(--radius-md);
    text-align: center;
}

.pix-code-box {
    margin: var(--spacing-md) 0;
}

.pix-code-box code {
    display: block;
    padding: var(--spacing-sm);
    background: #000;
    color: var(--text-secondary);
    font-size: 0.8rem;
    word-break: break-all;
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
}

.pix-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.section-description {
    margin-bottom: var(--spacing-md);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Header Deposit Button */
.btn-deposit {
    background: var(--color-primary);
    color: #000;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    height: fit-content;
    margin-left: 8px;
}

.user-actions {
    display: flex;
    align-items: center;
}

/* PIX Type Selector Pills */
.type-selector-pills {
    display: flex;
    gap: var(--spacing-xs);
}

.pill-btn {
    flex: 1;
    padding: 10px 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.pill-btn.active {
    background: rgba(255, 193, 7, 0.1);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.pill-btn:hover:not(.active) {
    background: var(--bg-input);
}

.current-balance-display {
    color: var(--color-primary);
    font-weight: 700;
}

/* --- Final Polish & Animations --- */

/* Animations */
.animal-emoji-display {
    font-size: 3.5rem;
    transition: var(--transition-fast);
}

.animal-card:hover .animal-emoji-display {
    filter: drop-shadow(0 0 10px var(--color-primary));
    transform: scale(1.1);
}

/* Closed Animals Styling */
.animal-card.closed {
    opacity: 0.6;
    filter: grayscale(0.8);
    cursor: not-allowed;
    border-color: var(--border-color);
}

.animal-card.closed:hover {
    border-color: var(--border-color);
    transform: none;
}

/* Sold Out Animals (Exclusive Scarcity) */
.animal-card.sold-out {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #ef4444;
    /* Red border for sold out */
    box-shadow: none;
    pointer-events: none;
    filter: grayscale(1);
}

.animal-card.sold-out .animal-img {
    filter: grayscale(1) opacity(0.5);
}

.animal-card.sold-out .name {
    color: var(--text-muted);
}

.animal-card.sold-out .group-numbers {
    visibility: hidden;
    /* Hide groups only */
}

/* Red number badge at top-right when sold out (standard shape) */
.animal-card.sold-out .number {
    visibility: visible;
    background: linear-gradient(135deg, #8b0000 0%, #ef4444 50%, #8b0000 100%);
    color: #000;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 0 var(--radius-md) 0 var(--radius-sm);
    box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.3);
}

.sold-out-badge {
    position: absolute;
    bottom: 12px;
    /* Position at the bottom where numbers are */
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #8b0000 0%, #ef4444 50%, #8b0000 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 900;
    z-index: 5;
    text-transform: uppercase;
    box-shadow: none;
    /* Removed pulsing shadow */
    animation: none;
    /* Removed animation */
    white-space: nowrap;
    pointer-events: none;
}

@keyframes pulse-red {
    0% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(239, 68, 68, 0.5);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 15px rgba(239, 68, 68, 0.8);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(239, 68, 68, 0.5);
    }
}

.closed-text {
    color: #e74c3c !important;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

/* Standardized Containers for Lists */
.results-list-container,
.withdrawal-list-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) 0;
}

/* Unified Finance Modal */
.finance-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) 0;
}

.finance-opt-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    text-align: left;
    transition: var(--transition-fast);
}

.finance-opt-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-primary);
}

.finance-opt-btn .opt-icon {
    font-size: 1.8rem;
    background: rgba(0, 255, 149, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.finance-opt-btn .opt-text strong {
    display: block;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.finance-opt-btn .opt-text p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Refined Results (Drawings) */
.draw-section {
    margin-bottom: var(--spacing-xl);
}

.draw-header {
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 8px;
    margin-bottom: var(--spacing-md);
}

.draw-header h4 {
    font-size: 0.9rem;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-card.secondary {
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.result-card.secondary .winner-animal.small {
    font-size: 1.5rem;
    width: 40px;
}

.rateio-note {
    color: #e67e22;
    font-size: 0.7rem;
    font-style: italic;
    margin-left: 5px;
}

.winner-name {
    font-weight: 700;
    color: var(--text-primary);
}

/* Screen Transitions */
.app-screen {
    animation: screenFadeIn 0.4s ease-out;
}

@keyframes screenFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toast system is now exclusively managed by toasts.css */

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Login Screen Styles */
.login-screen {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 180px);
    padding: var(--spacing-lg);
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.login-header h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-xs);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.btn-google {
    background: white;
    color: #333;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.btn-google:hover {
    background: #f8f8f8;
    border-color: #ccc;
}

.divider {
    display: flex;
    align-items: center;
    margin: var(--spacing-lg) 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    padding: 0 var(--spacing-md);
}

.login-footer {
    text-align: center;
    margin-top: var(--spacing-lg);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.link-btn {
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    font-size: inherit;
    text-decoration: underline;
    padding: 0;
}

.link-btn:hover {
    color: var(--color-secondary);
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: var(--spacing-md);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.auth-tab.active {
    color: var(--color-primary);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.auth-tab:hover:not(.active) {
    color: var(--text-primary);
}

.auth-tab-content {
    display: none;
}

.auth-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Expandable Card Styles - Seamless */
.card-expandable {
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    z-index: 2;
}

/* .card-expandable:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
} */

/* Remove bottom radius when expanded to merge with details */
.card-expandable.expanded {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-bottom-color: transparent !important;
    /* background-color: rgba(255, 255, 255, 0.1) !important; */
    /* Commented out - let result-card control its own background */
}

/* Bet Card Specifics */
.bet-card,
/* .result-card - MOVED TO history-cards.css */
/* .result-card {
    background: rgba(40, 40, 40, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
} */

.bet-card:active,
.trans-card:active {
    transform: scale(0.98);
    background: rgba(50, 50, 50, 0.6);
}

/* Expanded Details Section */
.expanded-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
    background: rgba(255, 255, 255, 0.1);
    /* Match active card background */
    border-radius: 0 0 12px 12px;
    margin-top: -1px;
    /* FIX: Overlap the card border to prevent the "black bar" gap */
    position: relative;
    z-index: 1;
    /* Below card */
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.expanded-details.open {
    max-height: 2000px;
    padding: 0 16px 16px 16px;
    opacity: 1;
    transform: translateY(0);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-label {
    font-weight: 600;
}

.detail-value {
    color: #fff;
    font-family: monospace;
    font-size: 0.85rem;
}

/* PIX Modal Layout Fixes */
.premium-fullscreen {
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    display: flex;
    flex-direction: column;
}

.qrcode-wrapper-premium {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.qrcode-wrapper-premium img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Ensure body doesn't scroll when modal is open */
body.modal-open {
    overflow: hidden;
}


/* Common Component Helpers */
.section-header-flex {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.balance-amount-large {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* Game Locked Overlay */
.game-locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.locked-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.locked-title {
    color: #fff;
    margin: 0 0 5px;
}

.locked-text {
    color: #94a3b8;
    font-size: 0.9rem;
    text-align: center;
    padding: 0 20px;
}

/* Profile / Legal Styles */
.btn-delete-request {
    margin-top: 10px;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    opacity: 0.7;
    font-size: 0.8rem;
}

.legal-info-container {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.legal-info-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.legal-info-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 0.85rem;
}

.legal-link {
    color: var(--color-primary);
    text-decoration: none;
}

/* Modal Helpers */
.modal-description {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.mfa-input-large {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 5px;
}

/* Restore card aesthetic with slight rounding and borders */
/* Restore card aesthetic with slight rounding and borders */
.bet-card,
.trans-card {
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* .result-card moved to history-cards.css */