/* ============================================
   VozhaOmuz Pay — Premium Payment Page Styles
   ============================================ */

/* Font loaded via HTML <link> tag for performance */

:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #111640;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --bg-popular: rgba(99, 102, 241, 0.1);
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --success: #10b981;
    --error: #ef4444;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(99, 102, 241, 0.4);
    --gold: #f59e0b;
    --radius: 16px;
    --radius-sm: 10px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background decoration */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.04) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

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

/* Header */
.header {
    text-align: center;
    margin-bottom: 48px;
}

.logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    color: white;
    box-shadow: 0 8px 32px var(--accent-glow);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.header h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.header p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
}

/* Tariff Cards Grid */
.tariffs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 36px;
}

.tariff-card {
    position: relative;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.tariff-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.tariff-card.selected {
    background: var(--bg-popular);
    border-color: var(--border-accent);
    box-shadow: 0 0 30px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tariff-card.popular {
    border-color: rgba(99, 102, 241, 0.2);
}

.popular-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.test-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.save-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(245, 158, 11, 0.15);
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}

.tariff-duration {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    margin-top: 4px;
}

.tariff-price {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-primary);
    line-height: 1;
}

.tariff-price span {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0;
}

.tariff-monthly {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

.tariff-radio {
    display: none;
}

/* Form Section */
.form-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    transition: all 0.2s;
    outline: none;
}

.form-input:focus {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Payment buttons */
.gate-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.gate-btn {
    flex: 1;
    padding: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.gate-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

.gate-btn.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--border-accent);
    color: var(--accent-light);
}

.gate-radio {
    display: none;
}

.pay-btn {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 17px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
    position: relative;
    overflow: hidden;
}

.pay-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.pay-btn:active {
    transform: translateY(0);
}

.pay-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.pay-btn .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto;
}

.pay-btn.loading .btn-text {
    display: none;
}

.pay-btn.loading .spinner {
    display: block;
}

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

/* Price summary */
.price-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    margin-top: 20px;
    margin-bottom: 20px;
}

.price-summary .label {
    font-size: 15px;
    color: var(--text-secondary);
}

.price-summary .amount {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.price-summary .amount span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Features list */
.features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 36px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.feature-icon {
    width: 32px;
    height: 32px;
    background: rgba(99, 102, 241, 0.12);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.feature-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Result pages */
.result-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px 40px;
    text-align: center;
    max-width: 420px;
    width: 100%;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 24px;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.result-icon.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.2);
}

.result-icon.error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.2);
}

.result-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.result-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 28px;
}

.result-btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.result-btn.primary {
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    color: white;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.result-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.result-btn.secondary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    margin-left: 12px;
}

/* User validation */
.user-validation {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
    min-height: 22px;
    transition: all 0.3s;
}

.user-validation.loading {
    color: var(--text-muted);
}

.user-validation.success {
    color: var(--success);
    animation: fadeSlideIn 0.3s ease;
}

.user-validation.error {
    color: var(--error);
    animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dot-pulse {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: dotPulse 1s ease-in-out infinite;
    margin-right: 4px;
}

@keyframes dotPulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

/* ID Hint box */
.id-hint {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: var(--radius-sm);
    margin-top: 20px;
    margin-bottom: 20px;
}

.id-hint-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.id-hint-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.id-hint-text strong {
    color: var(--gold);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.footer p {
    font-size: 13px;
    color: var(--text-muted);
}

.footer a {
    color: var(--accent-light);
    text-decoration: none;
}

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

    .tariffs-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .features {
        grid-template-columns: 1fr;
    }

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

    .tariff-price {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .tariffs-grid {
        grid-template-columns: 1fr;
    }

    .gate-selector {
        flex-direction: column;
    }

    .form-section {
        padding: 24px 20px;
    }

    .result-card {
        padding: 36px 24px;
    }
}