/* ===============
   RESET & VARIABLES
   =============== */
:root {
    --brand-primary: #00ffaa;
    --brand-secondary: #00b3ff;
    --bg-dark: #0a0a0f;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #8b8b9a;
    --input-bg: rgba(0, 0, 0, 0.4);
    --focus-ring: rgba(0, 255, 170, 0.3);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-round: 999px;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

html, body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

/* ===============
   BACKGROUND & AMBIENT EFFECTS
   =============== */
.app-background {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: radial-gradient(circle at 50% 0%, #151522 0%, var(--bg-dark) 100%);
}

.ambient-light-1, .ambient-light-2 {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    opacity: 0.15;
    pointer-events: none;
}

.ambient-light-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    left: -200px;
    background: var(--brand-primary);
}

.ambient-light-2 {
    width: 500px;
    height: 500px;
    bottom: -100px;
    right: -100px;
    background: var(--brand-secondary);
}

/* ===============
   LAYOUT & CONTAINERS
   =============== */
.payment-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 10;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.app-header {
    text-align: center;
    margin-bottom: 32px;
}

.company-logo {
    height: 64px;
    width: auto;
    margin-bottom: 20px;
    display: inline-block;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.app-header h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.app-header .subtitle {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 400;
}

/* ===============
   GLASSMORPHISM CARD
   =============== */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

/* ===============
   INPUTS & GROUPS
   =============== */
.input-group {
    margin-bottom: 24px;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.input-wrapper:focus-within {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px var(--focus-ring);
}

.input-wrapper input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 15px;
    padding: 16px;
    outline: none;
}

.input-wrapper input::placeholder {
    color: #4a4a5a;
}

/* Amount specific formatting */
.amount-wrapper {
    padding-left: 14px;
}

.amount-wrapper input {
    font-size: 28px;
    font-weight: 600;
    padding: 14px 16px;
}

.currency-prefix {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 12px;
    border-right: 1px solid var(--card-border);
    color: var(--text-main);
    font-weight: 500;
    font-size: 14px;
}

.currency-logo {
    width: 24px;
    height: 24px;
}

.approx-value {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: right;
    font-weight: 500;
}

/* ===============
   INPUT ACTIONS & BUTTONS
   =============== */
.input-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 12px;
}

.action-btn {
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--radius-sm);
}

.text-brand {
    color: var(--brand-primary);
    padding: 6px 10px;
}

.text-brand:hover {
    background: rgba(0, 255, 170, 0.1);
}

.icon-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    opacity: 0.8;
}

.icon-btn:hover img {
    opacity: 1;
}

.pill-btn {
    border: none;
    padding: 6px 14px;
    border-radius: var(--radius-round);
    font-size: 12px;
    font-weight: 600;
    color: var(--bg-dark);
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brand-gradient {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    box-shadow: 0 4px 12px rgba(0, 255, 170, 0.2);
}

.brand-gradient:hover {
    box-shadow: 0 6px 16px rgba(0, 255, 170, 0.4);
    transform: translateY(-1px);
}

/* ===============
   NETWORK SELECTOR
   =============== */
.network-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    cursor: default;
}

.network-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    background: #f3ba2f; /* BNB Yellow */
    display: flex;
    align-items: center;
    justify-content: center;
}

.network-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.network-name {
    font-weight: 500;
    font-size: 15px;
    flex: 1;
}

.network-status.active {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-primary);
    box-shadow: 0 0 8px var(--brand-primary);
}

/* ===============
   PRIMARY ACTION FOOTER
   =============== */
.action-footer {
    margin-top: 32px;
}

.primary-btn {
    width: 100%;
    height: 56px;
    border: none;
    border-radius: var(--radius-round);
    font-size: 18px;
    font-weight: 600;
    color: var(--bg-dark);
    background: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.primary-btn:not(:disabled) {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    box-shadow: 0 8px 24px rgba(0, 255, 170, 0.25);
}

.primary-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 255, 170, 0.4);
}

.primary-btn:disabled {
    background: var(--card-border);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.primary-btn:not(:disabled):hover .btn-icon {
    transform: translateX(4px);
}

/* Spinner used in main.js */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: var(--bg-dark);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Replace inline notify bar styles natively via this UI */
#notify-bar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 260px;
    max-width: 90vw;
    padding: 16px 32px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(10px);
}