/* Withdraw Page Styles - Premium Professional Design */
:root {
    --withdraw-gradient-start: #304FFE;
    --withdraw-gradient-end: #00d4ff;
    --withdraw-success: #2ed573;
    --withdraw-error: #e74c3c;
    --withdraw-card-bg: #ffffff;
    --withdraw-text-primary: #1a1a2e;
    --withdraw-text-secondary: #6b7280;
    --withdraw-border: #e5e7eb;
    --withdraw-input-bg: #f9fafb;
    --withdraw-shadow: 0 10px 40px rgba(48, 79, 254, 0.08);
    --withdraw-shadow-hover: 0 20px 60px rgba(48, 79, 254, 0.15);
}

.withdraw-main {
    background: linear-gradient(160deg, #f0f4ff 0%, #ffffff 40%, #f5f8ff 100%);
    padding: 40px 20px 60px;
    min-height: calc(100vh - 80px);
    position: relative;
    overflow: hidden;
}

.withdraw-main::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(48, 79, 254, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.withdraw-main::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.withdraw-section,
.otp-section,
.success-section,
.rejected-section {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card Shared Styles */
.withdraw-card,
.otp-card,
.success-card,
.rejected-card {
    background: var(--withdraw-card-bg);
    border-radius: 24px;
    padding: 40px 36px;
    max-width: 480px;
    width: 100%;
    box-shadow: var(--withdraw-shadow);
    border: 1px solid rgba(229, 231, 235, 0.6);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.withdraw-card:hover {
    box-shadow: var(--withdraw-shadow-hover);
    transform: translateY(-2px);
}

/* Card Header Glow */
.card-header-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--withdraw-gradient-start), var(--withdraw-gradient-end));
    border-radius: 24px 24px 0 0;
}

/* Icon Wrapper */
.card-icon-wrapper,
.otp-icon-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    position: relative;
}

.icon-bg-ring {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(48, 79, 254, 0.08) 0%, rgba(0, 212, 255, 0.05) 100%);
    animation: pulseRing 3s ease-in-out infinite;
}

.otp-ring {
    width: 90px;
    height: 90px;
}

.card-icon,
.otp-icon {
    position: relative;
    z-index: 1;
    animation: floatIcon 3s ease-in-out infinite;
}

/* Title & Description */
.page-title,
.otp-title {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--withdraw-text-primary) 0%, #4b5563 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 10px;
    text-align: center;
    letter-spacing: -0.5px;
}

.page-description,
.otp-description {
    font-size: 15px;
    color: var(--withdraw-text-secondary);
    text-align: center;
    margin: 0 0 28px;
    line-height: 1.6;
}

/* Balance Display */
.balance-display {
    background: linear-gradient(135deg, rgba(48, 79, 254, 0.06) 0%, rgba(0, 212, 255, 0.04) 100%);
    border-radius: 16px;
    padding: 18px 22px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1.5px solid rgba(48, 79, 254, 0.12);
    position: relative;
    overflow: hidden;
}

.balance-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(48, 79, 254, 0.03) 0%, transparent 100%);
    pointer-events: none;
}

.balance-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.balance-info svg {
    opacity: 0.7;
}

.balance-label {
    font-size: 14px;
    color: var(--withdraw-text-secondary);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.balance-value {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--withdraw-gradient-start) 0%, var(--withdraw-gradient-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
}

/* Form Styles */
.withdraw-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--withdraw-text-primary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--withdraw-gradient-start);
    pointer-events: none;
    z-index: 2;
}

[dir="rtl"] .input-prefix {
    left: auto;
    right: 16px;
}

.input-icon {
    position: absolute;
    right: 14px;
    color: var(--withdraw-text-secondary);
    opacity: 0.5;
    pointer-events: none;
    z-index: 2;
}

[dir="ltr"] .input-icon {
    right: auto;
    left: 14px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--withdraw-border);
    border-radius: 14px;
    font-size: 15px;
    font-family: inherit;
    background: var(--withdraw-input-bg);
    color: var(--withdraw-text-primary);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input.with-icon {
    padding-right: 44px;
}

[dir="ltr"] .form-input.with-icon {
    padding-right: 16px;
    padding-left: 44px;
}

.input-prefix + .form-input {
    padding-left: 36px;
}

[dir="rtl"] .input-prefix + .form-input {
    padding-left: 16px;
    padding-right: 36px;
}

.form-input:focus {
    outline: none;
    border-color: var(--withdraw-gradient-start);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(48, 79, 254, 0.08);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    padding-right: 16px;
    padding-left: 40px;
}

[dir="rtl"] .form-select {
    background-position: right 16px center;
    padding-left: 16px;
    padding-right: 40px;
}

[dir="rtl"] .form-input {
    text-align: right;
}

[dir="ltr"] .form-input {
    text-align: left;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 15px 24px;
    background: linear-gradient(135deg, #3053ff 0%, #3c63ff 60%, #4a73ff 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 22px rgba(48, 83, 255, 0.24);
    position: relative;
    overflow: hidden;
    margin-top: 6px;
    letter-spacing: 0.2px;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    box-shadow: 0 14px 28px rgba(48, 83, 255, 0.3);
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(1px);
}

.submit-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 6px 14px rgba(48, 83, 255, 0.16);
}

.submit-btn:disabled::before {
    display: none;
}

/* OTP Section */
.otp-icon-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.otp-shield {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(48, 79, 254, 0.08) 0%, rgba(0, 212, 255, 0.05) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: shieldPulse 3s ease-in-out infinite;
}

.otp-shield::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 23px;
    background: linear-gradient(135deg, var(--withdraw-gradient-start), var(--withdraw-gradient-end));
    opacity: 0.15;
    z-index: -1;
}

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

.otp-hint {
    font-size: 14px;
    color: var(--withdraw-text-secondary);
    text-align: center;
    margin: 0 0 24px;
}

.otp-container {
    margin-bottom: 24px;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    direction: ltr;
}

.otp-box {
    position: relative;
    width: 58px;
    height: 66px;
    border-radius: 12px;
    background: #ffffff;
    border: 1.5px solid #d6dbe8;
    transition: all 0.22s ease;
    overflow: hidden;
}

.otp-box::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    border: 2px solid #3e64ff;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.otp-box::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3053ff, #6f8cff);
    transform: scaleX(0);
    transition: transform 0.22s ease;
}

.otp-box:has(.otp-input:focus)::after,
.otp-box.filled::after {
    transform: scaleX(1);
}

.otp-box:has(.otp-input:focus),
.otp-box.filled {
    border-color: #b9c5e6;
    background: #ffffff;
    box-shadow: 0 8px 16px rgba(48, 83, 255, 0.12);
    transform: translateY(-1px);
}

.otp-box:has(.otp-input:focus)::before {
    opacity: 1;
}

.otp-box.shake {
    animation: boxShake 0.5s ease;
}

@keyframes boxShake {
    0%, 100% { transform: translateY(0); }
    15% { transform: translateY(-6px) rotate(-2deg); }
    30% { transform: translateY(-2px) rotate(2deg); }
    45% { transform: translateY(-4px) rotate(-1deg); }
    60% { transform: translateY(-1px) rotate(1deg); }
}

.otp-input {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    color: #1e2433;
    font-family: inherit;
    outline: none;
    padding: 0;
}

.otp-input::selection {
    background: rgba(48, 79, 254, 0.15);
}

.otp-submit-btn {
    margin-bottom: 24px;
}

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

.resend-text {
    font-size: 14px;
    color: var(--withdraw-text-secondary);
    margin: 0;
}

.resend-link {
    background: none;
    border: none;
    color: var(--withdraw-gradient-start);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.resend-link:hover {
    color: var(--withdraw-gradient-end);
    text-decoration: underline;
}

.resend-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.resend-timer {
    font-size: 13px;
    color: var(--withdraw-text-secondary);
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.resend-timer #timerCount {
    font-weight: 700;
    color: var(--withdraw-gradient-start);
    min-width: 22px;
}

.timer-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(48, 79, 254, 0.2);
    border-top-color: var(--withdraw-gradient-start);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Success Section */
.success-check-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 28px;
    position: relative;
    width: 100px;
    height: 100px;
}

.check-circle {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--withdraw-success) 0%, #20c997 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 24px rgba(46, 213, 115, 0.3);
}

.check-ring {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid rgba(46, 213, 115, 0.2);
    animation: ringPulse 2s ease-in-out infinite;
}

.success-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--withdraw-text-primary);
    margin: 0 0 12px;
    text-align: center;
}

.success-description {
    font-size: 15px;
    color: var(--withdraw-text-secondary);
    line-height: 1.6;
    text-align: center;
    margin: 0 0 28px;
}

/* Rejected Section */
.rejected-icon-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.rejected-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--withdraw-error);
    margin: 0 0 12px;
    text-align: center;
}

.rejected-description {
    font-size: 15px;
    color: var(--withdraw-text-secondary);
    line-height: 1.6;
    text-align: center;
    margin: 0 0 28px;
}

.reject-back-btn {
    background: linear-gradient(135deg, var(--withdraw-error) 0%, #c0392b 100%);
    box-shadow: 0 4px 16px rgba(231, 76, 60, 0.3);
}

.reject-back-btn:hover {
    box-shadow: 0 8px 24px rgba(231, 76, 60, 0.4);
}

/* Back Button */
.back-btn {
    width: 100%;
    padding: 14px 24px;
    background: transparent;
    color: var(--withdraw-gradient-start);
    border: 2px solid var(--withdraw-gradient-start);
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-btn:hover {
    background: rgba(48, 79, 254, 0.06);
    transform: translateY(-1px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseRing {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
}

@keyframes floatIcon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

@keyframes successPop {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes ringPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.15);
        opacity: 0;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.otp-inputs.shake .otp-input {
    animation: shake 0.4s ease;
}

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

.spinner-inline {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .withdraw-main {
        padding: 24px 16px 40px;
    }

    .withdraw-card,
    .otp-card,
    .success-card,
    .rejected-card {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .page-title,
    .otp-title,
    .success-title,
    .rejected-title {
        font-size: 22px;
    }

    .balance-value {
        font-size: 24px;
    }

    .balance-display {
        padding: 16px 18px;
    }

    .otp-box {
        width: 50px;
        height: 58px;
    }

    .otp-inputs {
        gap: 8px;
    }

    .otp-input {
        font-size: 22px;
    }

    .check-circle {
        width: 64px;
        height: 64px;
    }

    .check-ring {
        width: 90px;
        height: 90px;
    }
}

@media (max-width: 480px) {
    .withdraw-card,
    .otp-card,
    .success-card,
    .rejected-card {
        padding: 28px 18px;
    }

    .page-title,
    .otp-title {
        font-size: 20px;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 14px;
    }

    .submit-btn {
        padding: 14px 20px;
        font-size: 15px;
    }

    .otp-box {
        width: 44px;
        height: 52px;
        border-radius: 12px;
    }

    .otp-inputs {
        gap: 6px;
    }

    .otp-input {
        font-size: 20px;
    }

    .otp-shield {
        width: 70px;
        height: 70px;
    }

    .balance-value {
        font-size: 22px;
    }
}
