:root {
    --bg-color: #ebf1f6;
    --white: #ffffff;
    --primary-blue: #3171a9;
    --primary-blue-hover: #255a8a;
    --text-color: #333333;
    --input-border: #dcdcdc;
    --success-green: #8eb33b;
    --success-green-hover: #7a9c32;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --sidebar-bg: #f8f9fa;
    --active-tab-bg: #3171a9;
    --active-tab-text: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Login Page Styles */
.login-container {
    background: var(--white);
    width: 100%;
    max-width: 450px;
    padding: 0;
    /* Remove padding to allow banner to span full width if needed, or adjust */
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
    overflow: hidden;
}

.error-banner {
    background: #e5e5e5;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}

.error-banner i {
    font-size: 32px;
    color: #313d4b;
}

.login-form {
    padding: 40px;
}

.login-form .input-group {
    position: relative;
    margin-bottom: 20px;
}

.login-form .input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.login-form input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.login-form input:focus {
    border-color: var(--primary-blue);
}

.captcha-section {
    background: #f8fbfe;
    border: 1px solid #e1e8ed;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.captcha-header {
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 5px;
    font-size: 14px;
}

.captcha-desc {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

.captcha-image-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    background: #eee;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.captcha-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.captcha-slider-track {
    width: 100%;
    height: 40px;
    background: #f0f0f0;
    border-radius: 20px;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 5px;
}

.captcha-slider-button {
    width: 50px;
    height: 30px;
    background: var(--success-green);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.login-btn:hover {
    background: var(--primary-blue-hover);
}

/* Payment Page Styles */
.payment-body {
    background-color: #f4f7f9;
    display: block;
    min-height: 100vh;
}

.header {
    background: white;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-bottom: 1px solid #e1e8ed;
}

.account-info {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.copy-icon {
    cursor: pointer;
    color: #999;
}

.sub-header {
    padding: 10px 30px;
    font-size: 14px;
    color: var(--primary-blue);
}

.main-content {
    display: flex;
    padding: 20px 30px;
    gap: 20px;
}

.sidebar {
    width: 250px;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    align-self: flex-start;
}

.tab-link {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

.tab-link:hover {
    background: #fafafa;
}

.tab-link.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.tab-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.tab-link.active .tab-count {
    background: rgba(255, 255, 255, 0.2);
}

.payment-grid {
    flex: 1;
}

.section-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-blue);
    text-transform: uppercase;
    margin-bottom: 10px;
    background: #e1e9f1;
    padding: 10px 15px;
    border-radius: 4px;
}

.methods-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.method-card {
    background: white;
    width: 150px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.2s;
}

.method-card:hover {
    transform: translateY(-2px);
}

.method-icons {
    padding: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.method-icons img {
    height: 24px;
}

.method-name {
    background: var(--primary-blue);
    color: white;
    padding: 10px;
    font-size: 12px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    /* Changed via JS */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    cursor: pointer;
    color: #999;
}

.modal-header {
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header img {
    height: 32px;
}

.modal-body {
    padding: 20px 30px;
    font-size: 14px;
    line-height: 1.4;
}

.modal-body .info-row {
    margin-bottom: 15px;
}

.modal-body .warning {
    color: #d93025;
    font-weight: 600;
    margin-top: 10px;
}

.confirm-btn {
    width: 100%;
    padding: 12px;
    background: var(--success-green);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
}

.qr-section {
    text-align: center;
}

.address-box {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    word-break: break-all;
    font-family: monospace;
    font-size: 12px;
    position: relative;
    margin-top: 10px;
    cursor: pointer;
}

.qr-image {
    width: 150px;
    height: 150px;
    margin: 20px auto;
    background: #eee;
}

.qr-image img {
    width: 100%;
    height: 100%;
}

.limit-info {
    background: var(--primary-blue);
    color: white;
    padding: 15px;
    border-radius: 4px;
    font-size: 11px;
    margin-top: 20px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
}