/* ========================================
   GiftCardX - Crypto Payment Registration System
   Dark Theme - Comprehensive Styling
   ======================================== */

:root {
    --primary: #0a0f1c;
    --secondary: #1a1f2e;
    --tertiary: #2a3a4e;
    --accent: #2a6df4;
    --accent-light: #4a8dff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-primary: #ffffff;
    --text-secondary: #e5e7eb;
    --text-tertiary: #9ca3af;
    --border: #374151;
}

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

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    min-height: 100vh;
}

/* ========================================
   Background & Layout
   ======================================== */

.page-background {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    overflow: hidden;
}

.page-background::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(42, 109, 244, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ========================================
   Blur Effect for Unauthenticated Users
   ======================================== */

.blur-content {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
}

/* ========================================
   Modal Styling
   ======================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: none;
    z-index: 1040;
}

.modal-overlay.active {
    display: block;
}

.auth-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--secondary);
    border: 1px solid var(--tertiary);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    display: none;
    z-index: 1050;
    padding: 0;
}

.auth-modal.active {
    display: block;
}

.modal-content {
    padding: 40px 30px;
}

.modal-header-custom {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}

.modal-header-custom h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Tabs
   ======================================== */

.modal-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 25px;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 600;
    padding: 12px 16px;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.tab-btn.active {
    color: var(--accent);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* ========================================
   Forms
   ======================================== */

.auth-form {
    width: 100%;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-control,
.form-select {
    background-color: var(--primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 12px 14px;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--primary);
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(42, 109, 244, 0.1);
}

.form-control::placeholder {
    color: var(--text-tertiary);
    opacity: 0.7;
}

.form-control-dark {
    background-color: var(--primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.input-group-text {
    background-color: var(--primary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(42, 109, 244, 0.3);
}

.btn-primary:disabled {
    background: var(--tertiary);
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-outline-primary {
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn-outline-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.btn-outline-secondary {
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-outline-secondary:hover {
    background: var(--tertiary);
    border-color: var(--accent);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* ========================================
   Alerts
   ======================================== */

.alert {
    border-radius: 8px;
    padding: 12px 16px;
    border: 1px solid;
    font-size: 14px;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: #fca5a5;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
    color: #86efac;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: var(--warning);
    color: #fcd34d;
}

.alert-info {
    background-color: rgba(42, 109, 244, 0.1);
    border-color: var(--accent);
    color: #93c5fd;
}

/* ========================================
   Index Page - Landing Page
   ======================================== */

header.navbar-dark {
    position: relative;
    z-index: 10;
}

.logo-placeholder {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.feature-card {
    background: rgba(26, 31, 46, 0.5);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--accent);
    background: rgba(42, 109, 244, 0.05);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

footer {
    position: relative;
    z-index: 10;
}

/* ========================================
   Verification Page
   ======================================== */

.verification-container {
    background: var(--secondary);
    border: 1px solid var(--tertiary);
    border-radius: 16px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

.verification-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
}

.verification-form {
    width: 100%;
}

.otp-input {
    font-size: 24px;
    letter-spacing: 8px;
    font-weight: 700;
    font-family: monospace;
    text-align: center;
}

/* ========================================
   Deposit Page - CRITICAL
   ======================================== */

.deposit-container {
    position: relative;
    z-index: 10;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.deposit-header {
    margin-bottom: 50px;
    text-align: center;
}

.deposit-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
}

.deposit-section {
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
}

.deposit-section h5 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* ========================================
   Amount Input
   ======================================== */

.amount-input-group {
    margin-bottom: 20px;
}

.amount-controls {
    display: flex;
    gap: 10px;
}

.amount-controls button {
    flex: 1;
    padding: 10px 0;
    font-size: 18px;
}

/* ========================================
   Crypto Cards
   ======================================== */

.crypto-card {
    background: var(--primary);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.crypto-card:hover {
    border-color: var(--accent);
    background: rgba(42, 109, 244, 0.05);
    transform: translateY(-3px);
}

.crypto-card.selected {
    border-color: var(--accent);
    background: rgba(42, 109, 244, 0.15);
    box-shadow: 0 0 20px rgba(42, 109, 244, 0.3), inset 0 0 20px rgba(42, 109, 244, 0.1);
}

.crypto-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.crypto-name {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.crypto-symbol {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

/* ========================================
   QR Code & Wallet
   ======================================== */

.qr-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.qr-code {
    width: 100%;
    max-width: 300px;
}

.qr-code img {
    width: 100%;
    height: auto;
    display: block;
}

.wallet-info {
    background: var(--primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
}

.wallet-info .input-group {
    margin-top: 10px;
}

.wallet-info button {
    font-size: 13px;
    padding: 8px 12px;
}

/* ========================================
   Amount Info
   ======================================== */

.amount-info {
    background: var(--primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

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

/* ========================================
   Status Messages
   ======================================== */

.status-container {
    background: var(--primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.status-badge {
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    color: #fcd34d;
}

.status-confirmed {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: #86efac;
}

.status-failed {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: #fca5a5;
}

.confirmations {
    margin-top: 10px;
    color: var(--text-tertiary);
}

/* ========================================
   Checkboxes
   ======================================== */

.form-check-input {
    width: 18px;
    height: 18px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background-color: var(--primary);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.form-check-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(42, 109, 244, 0.25);
}

.form-check-label {
    cursor: pointer;
    margin-left: 8px;
}

/* ========================================
   Links & Text
   ======================================== */

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-light);
}

.btn-link {
    background: none;
    border: none;
    color: var(--accent);
    padding: 0;
    cursor: pointer;
    font-weight: 600;
}

.btn-link:hover {
    color: var(--accent-light);
}

.text-light-emphasis {
    color: var(--text-secondary);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .modal-content {
        padding: 30px 20px;
    }

    .verification-container {
        padding: 30px 20px;
    }

    .deposit-container {
        padding: 20px 15px;
    }

    .deposit-section {
        padding: 20px;
    }

    .deposit-header h1 {
        font-size: 24px;
    }

    .qr-container {
        margin-bottom: 20px;
    }

    .feature-card {
        padding: 20px 15px;
    }

    .modal-tabs {
        gap: 5px;
    }

    .tab-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .modal-content {
        padding: 25px 15px;
    }

    .modal-header-custom h2 {
        font-size: 22px;
    }

    .auth-modal {
        width: 95%;
    }

    .verification-container {
        padding: 25px 15px;
    }

    .deposit-container {
        padding: 15px 10px;
    }

    .deposit-section {
        padding: 15px;
    }

    .deposit-header h1 {
        font-size: 20px;
    }

    .deposit-header p {
        font-size: 14px;
    }

    .btn-lg {
        padding: 10px 15px;
        font-size: 14px;
    }

    .feature-card {
        padding: 15px 10px;
    }

    .feature-icon {
        font-size: 32px;
    }

    .crypto-card {
        padding: 15px 10px;
    }

    .crypto-icon {
        font-size: 32px;
    }

    .row {
        margin-left: -5px;
        margin-right: -5px;
    }

    .col-md-6,
    .col-lg-4 {
        padding-left: 5px;
        padding-right: 5px;
    }
}

/* ========================================
   Bootstrap Overrides
   ======================================== */

.min-vh-100 {
    min-height: 100vh;
}

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

/* ========================================
   Loading States
   ======================================== */

.spinner-border {
    border-color: rgba(255, 255, 255, 0.25);
    border-right-color: var(--accent);
}

/* ========================================
   Utility Classes
   ======================================== */

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

.gap-4 {
    gap: 1.5rem;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spinner-border {
    animation: spin 0.75s linear infinite;
}
