.withdraw-page {
    min-height: 100vh;
    background: var(--bg-page);
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
}

.withdraw-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-card);
    border-bottom: 1px solid rgba(0, 240, 255, 0.3);
    box-shadow: var(--shadow-medium);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header-back {
    width: 42px;
    height: 42px;
    background: var(--bg-elevated);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.header-back:hover {
    background: var(--accent-gradient);
    border-color: var(--accent-secondary);
    box-shadow: var(--shadow-glow-primary);
    transform: scale(1.08);
}

.header-back svg {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
    transition: color 0.3s ease;
}

.header-back:hover svg {
    color: var(--text-inverse);
}

.header-center {
    flex: 1;
    text-align: center;
}

.header-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 0.5px;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.header-history {
    width: 42px;
    height: 42px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: var(--shadow-glow-secondary);
}

.header-history:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-glow-primary), 0 8px 24px rgba(0, 240, 255, 0.3);
}

.header-history svg {
    width: 22px;
    height: 22px;
    color: var(--text-inverse);
}

.withdraw-main {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.withdraw-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 28px;
    align-items: start;
}

.grid-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 24px;
}

.balance-card-compact {
    background: var(--gradient-card);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-card), 0 0 0 1px var(--border-color);
    border: 1px solid rgba(0, 240, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.balance-card-compact::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.balance-card-header {
    margin-bottom: 16px;
}

.balance-label-compact {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.balance-display-compact {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -1px;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    position: relative;
    z-index: 1;
}

.input-card-compact {
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-light);
}

.input-card-header {
    margin-bottom: 16px;
}

.input-label-compact {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.input-wrapper-compact {
    position: relative;
    margin-bottom: 12px;
}

.currency-symbol {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-primary);
    pointer-events: none;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.amount-input-compact {
    width: 100%;
    padding: 18px 20px 18px 50px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-elevated);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 16px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.amount-input-compact:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15);
}

.amount-input-compact.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.15);
}

.amount-input-compact::placeholder {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 15px;
}

.error-message-compact {
    font-size: 13px;
    color: #ffffff;
    font-weight: 600;
    min-height: 20px;
    padding-left: 4px;
}

.fee-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 240, 255, 0.15);
}

.fee-info-row:last-child {
    border-bottom: none;
}

.fee-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.fee-value {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 700;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.fee-value.highlight {
    color: var(--accent-primary);
    font-size: 18px;
}

.submit-button-compact {
    width: 100%;
    padding: 18px 28px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 16px;
    color: var(--text-inverse);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-glow-primary);
    letter-spacing: 0.5px;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.submit-button-compact:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-primary), 0 12px 32px rgba(0, 240, 255, 0.4);
}

.submit-button-compact:active {
    transform: translateY(0);
}

.submit-button-compact svg {
    width: 20px;
    height: 20px;
}

.grid-right {
    min-height: 400px;
}

.info-panel {
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 24px;
}

.info-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}

.info-panel-header svg {
    width: 26px;
    height: 26px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.info-panel-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 0.3px;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.info-badge {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: #FFFFFF;
    box-shadow: var(--shadow-glow-secondary);
}

.info-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    padding-top: 4px;
}

.info-content strong {
    color: var(--text-primary);
    font-weight: 700;
}

.toast {
    position: fixed;
    top: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(-120%);
    background: var(--bg-overlay);
    color: var(--text-inverse);
    padding: 18px 32px;
    border-radius: 16px;
    border: 1px solid rgba(0, 240, 255, 0.3);
    box-shadow: var(--shadow-card);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 90%;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    backdrop-filter: blur(20px);
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: rgba(0, 255, 163, 0.95);
    border-color: var(--success);
    box-shadow: 0 8px 32px rgba(0, 255, 163, 0.4);
}

.toast.error {
    background: rgba(255, 0, 64, 0.95);
    border-color: var(--danger);
    color: var(--text-inverse);
    box-shadow: 0 8px 32px rgba(255, 0, 64, 0.4);
}

.toast.warning {
    background: rgba(255, 107, 53, 0.95);
    border-color: var(--warning);
    color: var(--text-primary);
    box-shadow: 0 8px 32px rgba(255, 107, 53, 0.4);
}

.toast.info {
    background: rgba(0, 240, 255, 0.95);
    border-color: var(--info);
    color: #000000;
    box-shadow: 0 8px 32px rgba(0, 240, 255, 0.4);
}

.loading {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 20, 0.98);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading.active {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 64px;
    height: 64px;
    border: 5px solid var(--border-light);
    border-top-color: var(--accent-primary);
    border-right-color: var(--accent-secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: var(--shadow-glow-secondary);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 900px) {
    .withdraw-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .grid-left {
        position: relative;
        top: auto;
    }

    .info-panel {
        position: relative;
        top: auto;
    }
}

@media (max-width: 640px) {
    .withdraw-header {
        padding: 16px;
    }

    .header-back,
    .header-history {
        width: 40px;
        height: 40px;
    }

    .header-back svg,
    .header-history svg {
        width: 18px;
        height: 18px;
    }

    .header-title {
        font-size: 18px;
    }

    .withdraw-main {
        padding: 20px 16px;
    }

    .withdraw-grid {
        gap: 20px;
    }

    .balance-card-compact {
        padding: 20px;
        border-radius: 18px;
    }

    .balance-display-compact {
        font-size: 36px;
    }

    .input-card-compact {
        padding: 20px;
        border-radius: 18px;
    }

    .amount-input-compact {
        padding: 16px 18px 16px 46px;
        font-size: 22px;
        border-radius: 14px;
    }

    .currency-symbol {
        left: 18px;
        font-size: 22px;
    }

    .submit-button-compact {
        padding: 16px 24px;
        font-size: 15px;
        border-radius: 14px;
    }

    .info-panel {
        padding: 24px 20px;
        border-radius: 18px;
    }

    .info-panel-title {
        font-size: 18px;
    }

    .info-list {
        gap: 20px;
    }

    .info-badge {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .info-content {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .withdraw-header {
        padding: 14px;
    }

    .header-back,
    .header-history {
        width: 38px;
        height: 38px;
    }

    .header-back svg,
    .header-history svg {
        width: 16px;
        height: 16px;
    }

    .header-title {
        font-size: 16px;
    }

    .withdraw-main {
        padding: 16px 12px;
    }

    .balance-card-compact {
        padding: 18px;
    }

    .balance-display-compact {
        font-size: 32px;
    }

    .input-card-compact {
        padding: 18px;
    }

    .amount-input-compact {
        padding: 15px 16px 15px 42px;
        font-size: 20px;
    }

    .currency-symbol {
        left: 16px;
        font-size: 20px;
    }

    .error-message-compact {
        font-size: 12px;
    }

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

    .info-panel {
        padding: 20px 16px;
    }

    .info-panel-title {
        font-size: 17px;
    }

    .info-badge {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }

    .info-content {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .balance-display-compact {
        font-size: 28px;
    }

    .amount-input-compact {
        padding: 14px 14px 14px 40px;
        font-size: 18px;
    }

    .currency-symbol {
        left: 14px;
        font-size: 18px;
    }

    .submit-button-compact {
        padding: 14px 18px;
        font-size: 13px;
    }

    .info-panel-title {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
