.wallet-modal,
.refer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1100;
}

.wallet-container,
.refer-container {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.wallet-header,
.refer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.balance-card {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 2rem;
}

.balance-amount {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1rem 0;
}

.withdraw-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
}

.form-group input,
.form-group select {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
}

.submit-button {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.3);
}

.referral-card {
    background: linear-gradient(45deg, var(--secondary-color), #64b5f6);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 2rem;
}

.referral-code {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 1rem 0;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.referral-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.copy-button,
.share-button {
    background: white;
    color: var(--secondary-color);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-button:hover,
.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.copy-success {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(76, 175, 80, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    opacity: 0;
    transition: all 0.3s ease;
}

.copy-success.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.success-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    z-index: 1200;
    animation: popup-fade 0.5s forwards;
}

@keyframes popup-fade {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.daily-bonus-card {
    background: linear-gradient(45deg, #9c27b0, #673ab7);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    margin: 2rem 0;
}

.daily-bonus-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.daily-bonus-card p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.timer {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-family: monospace;
    font-size: 1.2rem;
}

.collect-button {
    background: white;
    color: #9c27b0;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.collect-button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.collect-button:disabled {
    background: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
}

.bonus-collected-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    z-index: 1200;
    animation: popup-slide 0.5s forwards;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.bonus-collected-popup i {
    font-size: 3rem;
    color: #ffc107;
    margin-bottom: 1rem;
    animation: coin-spin 1s ease-out;
}

@keyframes popup-slide {
    from {
        transform: translate(-50%, -30%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

@keyframes coin-spin {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(360deg);
    }
}