.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
    animation: fade-in-backdrop 0.3s ease-out;
}

.modal-backdrop.fading-out {
    animation: fade-out-backdrop 0.3s ease-out forwards;
}

.modal-content {
    background-color: var(--modal-bg);
    width: 100%;
    margin: 0 1rem 1rem;
    padding: 1.5rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: slide-up 0.3s ease-out;
    border: 1px solid var(--border-color);
}

.modal-content h3 {
    text-align: center;
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.modal-subtitle {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    text-align: center;
    margin-top: -1rem;
}

.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.payment-method-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    background-color: var(--payment-color);
    border-radius: 0.75rem;
    color: #aeb8d0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    min-height: 90px;
}

.payment-method-btn.active {
    border-color: var(--win-blue);
    background-color: rgba(55, 66, 250, 0.1);
    color: var(--primary-foreground);
}

.payment-method-withdraw-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    background-color: var(--payment-color);
    border-radius: 0.75rem;
    color: #aeb8d0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    min-height: 90px;
}

.payment-method-withdraw-btn.active {
    border-color: var(--win-blue);
    background-color: rgba(55, 66, 250, 0.1);
    color: var(--primary-foreground);
}

.payment-icon {
    width: 32px;
    height: 32px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.card-icon {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNhZWI4ZDAiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxyZWN0IHg9IjEiIHk9IjQiIHdpZHRoPSIyMiIgaGVpZ2h0PSIxNiIgcng9IjIiIHJ5PSIyIj48L3JlY3Q+PGxpbmUgeDE9IjEiIHkxPSIxMCIgeDI9IjIzIiB5Mj0iMTAiPjwvbGluZT48L3N2Zz4=');
}

.payment-method-btn.active .card-icon {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNmZmZmZmYiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxyZWN0IHg9IjEiIHk9IjQiIHdpZHRoPSIyMiIgaGVpZ2h0PSIxNiIgcng9IjIiIHJ5PSIyIj48L3JlY3Q+PGxpbmUgeDE9IjEiIHkxPSIxMCIgeDI9IjIzIiB5Mj0iMTAiPjwvbGluZT48L3N2Zz4=');
}

.payment-method-withdraw-btn.active .card-icon {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNmZmZmZmYiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxyZWN0IHg9IjEiIHk9IjQiIHdpZHRoPSIyMiIgaGVpZ2h0PSIxNiIgcng9IjIiIHJ5PSIyIj48L3JlY3Q+PGxpbmUgeDE9IjEiIHkxPSIxMCIgeDI9IjIzIiB5Mj0iMTAiPjwvbGluZT48L3N2Zz4=');
}

.crypto-icon {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNhZWI4ZDAiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwYXRoIGQ9Ik0xMiAyMmExMCAxMCAwIDEgMSAwLTIwIDEwIDEwIDAgMCAxIDAgMjB6Ij48L3BhdGg+PHBhdGggZD0iTTE1LjUgOC41Yy0uODMtMS41LTIuMi0yLjUtNC0yLjUtMi4yMSAwLTQgMS43OS00IDRzMS43OSA0IDQgNGMxLjggMCAzLjE3LTEgNC0yLjUiPjwvcGF0aD48cGF0aCBkPSJNMTIgNnYxMiI+PC9wYXRoPjwvc3ZnPg==');
}

.payment-method-btn.active .crypto-icon {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNmZmZmZmYiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwYXRoIGQ9Ik0xMiAyMmExMCAxMCAwIDEgMSAwLTIwIDEwIDEwIDAgMCAxIDAgMjB6Ij48L3BhdGg+PHBhdGggZD0iTTE1LjUgOC41Yy0uODMtMS41LTIuMi0yLjUtNC0yLjUtMi4yMSAwLTQgMS43OS00IDRzMS43OSA0IDQgNGMxLjggMCAzLjE3LTEgNC0yLjUiPjwvcGF0aD48cGF0aCBkPSJNMTIgNnYxMiI+PC9wYXRoPjwvc3ZnPg==');
}

.payment-method-withdraw-btn.active .crypto-icon {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNmZmZmZmYiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwYXRoIGQ9Ik0xMiAyMmExMCAxMCAwIDEgMSAwLTIwIDEwIDEwIDAgMCAxIDAgMjB6Ij48L3BhdGg+PHBhdGggZD0iTTE1LjUgOC41Yy0uODMtMS41LTIuMi0yLjUtNC0yLjUtMi4yMSAwLTQgMS43OS00IDRzMS43OSA0IDQgNGMxLjggMCAzLjE3LTEgNC0yLjUiPjwvcGF0aD48cGF0aCBkPSJNMTIgNnYxMiI+PC9wYXRoPjwvc3ZnPg==');
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.modal-input {
    width: 100%;
    padding: 0.9rem 2.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--payment-color);
    color: var(--foreground);
    text-align: center;
    outline: none;
}

.currency-symbol {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-foreground);
    font-size: 1rem;
    pointer-events: none;
}

.modal-action-btn {
    background-color: var(--win-success);
    color: var(--primary-foreground);
    padding: 0.9rem;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-action-btn:hover {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.modal-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.2);
}

.modal-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-action-btn:disabled:hover {
    background-color: var(--win-success);
    transform: none;
    box-shadow: none;
}

.minimum-amount-text {
    font-size: 0.75rem;
    color: #ef4444;
    text-align: center;
    margin: -0.6rem 0;
    padding: 0.4rem;
    background-color: transparent;
    border: none;
    display: block;
}

@keyframes fade-in-backdrop {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fade-out-backdrop {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes slide-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.event-card {
  background: var(--card);
  border-radius: 1rem;
  padding: 0.75rem 0.75rem 0.9rem;
  margin: 0.5rem 1rem;
}

.event-category { opacity: 0.8; }
.event-time { opacity: 0.7; font-size: 0.9rem; }
.event-time.live { color: #ff5b5b; font-weight: 700; }

.event-card-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
}

.favorite-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #FFC107;
}

.favorite-btn svg {
    width: 20px;
    height: 20px;
    transition: all 0.2s ease;
    fill: none;
    stroke: currentColor;
}

.favorite-btn.is-favorite svg {
    fill: #FFC107;
}

.event-card-main { margin-top: 0.35rem; }
.event-teams-new {
  font-weight: 600;
  font-size: 1.02rem;
}

.event-until-time {
    width: fit-content;
    white-space: nowrap;
    font-weight: 600;
    color: var(--primary-foreground);
    padding: 3px 5px;
    border-radius: 5px;
    background-color: var(--win-orange);
    font-size: 0.8rem;
}

.event-card-row-icons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.event-card-coef-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
}

.event-card-coef-name .outcome-logo,
.event-card-coef-name .draw-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  background: rgba(255,255,255,0.06);
  display: block;
  margin: 0 auto;
}

.event-card-coef-name .placeholder-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.event-card-coef-name .team-text {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
}


.event-card-row-coeffs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.55rem;
}
.coeff-btn-new {
  display: grid;
  place-items: center;
  min-height: 40px;
  background-color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s ease;
}
.coeff-btn-new[disabled] { opacity: .5; }

.event-card-coef-name span {
    max-width: 8.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.coeff-btn-new .coeff-value {
    color: var(--foreground);
    font-weight: 600;
}

.coeff-btn-new:hover {
    background-color: var(--secondary);
    border-color: var(--win-orange);
}

.coeff-btn-new.active-bet {
    background: var(--win-blue);
    border-color: var(--win-blue);
    color: white;
}

.coeff-btn-new.active-bet span {
    color: white;
}

.bet-slip-wrapper {
    background-color: var(--win-dark-medium);
    padding: 1rem;
    margin: 0 1rem 0.75rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: slide-in-down 0.3s ease-out;
}

@keyframes slide-in-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bet-slip-input-group {
    display: flex;
    align-items: center;
    background-color: var(--win-dark);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding-right: 0.75rem;
}

.bet-slip-input-group input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--foreground);
    font-size: 1rem;
    padding: 0.75rem;
    width: 100%;
    outline: none;
}

.bet-slip-payout-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.bet-slip-payout-section span {
    color: var(--muted-foreground);
}

.bet-slip-payout-section b {
    color: var(--win-success);
    font-weight: 700;
}

.bet-slip-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

#confirm-bet {
    flex-grow: 1;
    background-color: var(--win-success);
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 0.9rem;
    font-weight: 700;
    font-size: 1rem;
}

#confirm-bet:disabled {
    opacity: 0.5;
}

.express-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-foreground);
    cursor: pointer;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.express-checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--win-orange);
}

.non-clickable-header {
    opacity: 0;
    pointer-events: none;
    display: none;
}

.bonuses-container {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bonus-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.banner-text h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
}

.banner-car {
    font-size: 3rem;
}

.bonus-cards {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

.bonus-card {
    padding: 1.5rem;
    border-radius: 1rem;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.bonus-card:hover {
    transform: translateY(-2px);
}

.bonus-card.free-money {
    background: linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 100%);
    color: white;
}

.bonus-card.bonuses-main {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
}

.bonus-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.bonus-description {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.3;
}

.bonus-car-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
}

.floating-money {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 1rem;
    animation: float 2s ease-in-out infinite;
}

.bonus-gift {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.bonus-icons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.bonus-icon {
    font-size: 1.2rem;
}

.additional-bonuses {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bonus-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 1rem;
    gap: 1rem;
}

.bonus-item .bonus-icon {
    font-size: 2rem;
    min-width: 3rem;
    text-align: center;
}

.bonus-info {
    flex: 1;
}

.bonus-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.bonus-value {
    color: var(--accent-color);
    font-weight: 600;
}

.bonus-claim-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.bonus-claim-btn:hover {
    background: var(--accent-hover);
}

.bonus-claim-btn:disabled {
    background: #666;
    cursor: not-allowed;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.maintenance-modal {
    text-align: center;
    gap: 1.25rem;
}

.maintenance-icon {
    font-size: 3rem;
    margin: 0 auto;
    animation: rotate 2s linear infinite;
}

.maintenance-modal h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.maintenance-modal p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
    font-size: 0.9rem;
    text-align: center;
}

.maintenance-details {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1rem;
    margin: 0;
    text-align: left;
    border: 1px solid var(--border-color);
}

.maintenance-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.maintenance-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
}

.maintenance-icon-small {
    font-size: 1rem;
    width: 1.2rem;
    text-align: center;
    flex-shrink: 0;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .bonus-cards {
        grid-template-columns: 1fr;
    }

    .banner-text h2 {
        font-size: 1rem;
    }

    .banner-car {
        font-size: 2rem;
    }

    .maintenance-modal {
        max-width: 90%;
        margin: 0 1rem;
    }
}


.balance-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--text-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.outcome-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    display: block;
}

.draw-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    opacity: 0.9;
}


.placeholder-logo {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: linear-gradient(135deg, var(--muted) 0%, var(--muted-foreground) 100%);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
    position: relative;
    margin: 0 auto; 
}


.event-card-coef-name .placeholder-logo {
    width: 28px !important;
    height: 28px !important;
    border-radius: 6px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto; 
}

.event-card-row-icons .placeholder-logo {
    width: 28px !important;
    height: 28px !important;
    border-radius: 6px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto; 
}


.outcome-logo.placeholder-logo {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, var(--muted) 0%, var(--muted-foreground) 100%) !important;
}

.team-initial {
    font-size: 12px;
    font-weight: 700;
    color: var(--background);
    text-transform: uppercase;
    line-height: 1;
}


.outcome-logo[src=""] {
    background: linear-gradient(90deg, var(--muted) 25%, var(--muted-foreground) 50%, var(--muted) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}


.outcome-logo {
    transition: opacity 0.2s ease;
}

.outcome-logo:hover {
    opacity: 0.8;
}


.event-time.live {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: white;
    font-weight: 600;
    animation: pulse 2s infinite;
    border-radius: 4px;
    padding: 2px 6px;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}


.match-score {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin: 4px 0;
    text-align: center;
}


.match-time {
    font-size: 12px;
    color: var(--muted-foreground);
    background: var(--muted);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin: 2px 0;
}


.event-card-coef-name .team-text {
    max-width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--foreground);
    text-align: center;
}


@media (max-width: 480px) {
    .outcome-logo, .placeholder-logo {
        width: 28px;
        height: 28px;
    }
    
    .team-initial {
        font-size: 10px;
    }
    
    .event-card-coef-name .team-text {
        font-size: 0.85rem;
        max-width: 7rem;
    }
}