/* ===== xbox0.games VPN Site — Global Styles ===== */

:root {
    --bg-primary: #07070f;
    --bg-secondary: #0d0d1f;
    --bg-card: rgba(15, 15, 35, 0.85);
    --bg-card-border: rgba(99, 102, 241, 0.15);
    --bg-input: rgba(20, 20, 50, 0.8);
    --text-primary: #e8e8f0;
    --text-secondary: #8888a8;
    --text-muted: #555570;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --error: #ef4444;
    --error-glow: rgba(239, 68, 68, 0.3);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow-x: hidden;
    padding: 20px;
}

/* ===== Animated Background ===== */

.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    z-index: 0;
    animation: float 20s ease-in-out infinite;
}

.bg-glow-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 70%);
    top: -10%;
    right: -10%;
}

.bg-glow-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1), transparent 70%);
    bottom: -10%;
    left: -10%;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(30px, -30px);
    }

    66% {
        transform: translate(-20px, 20px);
    }
}

/* ===== Container & Card ===== */

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius);
    padding: 40px 36px;
    box-shadow: var(--shadow);
    animation: fadeUp 0.6s ease-out;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Logo Section ===== */

.logo-section {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent), #4f46e5);
    color: white;
    margin-bottom: 16px;
    box-shadow: 0 8px 32px var(--accent-glow);
}

.logo-text {
    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;
}

.tagline {
    color: var(--text-secondary);
    font-size: 15px;
    margin-top: 6px;
}

/* ===== Info Block ===== */

.info-block {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: var(--radius-sm);
    margin-bottom: 28px;
}

.info-icon {
    flex-shrink: 0;
    color: var(--accent-light);
    margin-top: 2px;
}

.info-block p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ===== Form ===== */

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--transition);
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: all var(--transition);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.input-wrapper input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-wrapper input:focus+.input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--accent-light);
}

/* ===== Captcha Checkbox ===== */

.captcha-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    transition: border-color var(--transition);
}

.captcha-group:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.captcha-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.captcha-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
}

.checkmark svg {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
    color: white;
}

.captcha-checkbox input[type="checkbox"]:checked~.checkmark {
    background: linear-gradient(135deg, var(--accent), #4f46e5);
    border-color: var(--accent);
    box-shadow: 0 2px 12px var(--accent-glow);
}

.captcha-checkbox input[type="checkbox"]:checked~.checkmark svg {
    opacity: 1;
    transform: scale(1);
}

.captcha-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.captcha-badge {
    color: var(--text-muted);
    opacity: 0.5;
    display: flex;
    align-items: center;
}

/* ===== Buttons ===== */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 24px;
    background: linear-gradient(135deg, var(--accent), #4f46e5);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 20px var(--accent-glow);
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-primary.loading {
    background: linear-gradient(135deg, #4f46e5, #3730a3);
}

.btn-text {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-loader {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    margin-top: 12px;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.05);
}

/* ===== Spinner ===== */

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Footer Note ===== */

.footer-note {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-note p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-note a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-note a:hover {
    color: var(--accent);
}

/* ===== Success Page ===== */

.success-card {
    max-width: 600px;
}

.success-header {
    text-align: center;
    margin-bottom: 28px;
}

.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    margin-bottom: 16px;
    box-shadow: 0 8px 32px var(--success-glow);
}

.success-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Config Details */

.config-details {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 24px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.detail-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.detail-label {
    font-size: 13px;
    color: var(--text-muted);
}

.detail-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-all;
    text-align: right;
    max-width: 60%;
}

/* VLESS Link Box */

.vless-section {
    margin-bottom: 24px;
}

.vless-section label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vless-link-box {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.vless-link-box code {
    flex: 1;
    display: block;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xs);
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: var(--accent-light);
    word-break: break-all;
    line-height: 1.5;
    max-height: 80px;
    overflow-y: auto;
}

.copy-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.copy-btn:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    background: rgba(99, 102, 241, 0.1);
}

.copy-toast {
    text-align: center;
    font-size: 13px;
    color: var(--success);
    margin-top: 8px;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.copy-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* QR Code */

.qr-section {
    margin-bottom: 28px;
}

.qr-section label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.qr-container {
    display: flex;
    justify-content: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
}

#qrcode {
    display: flex;
    justify-content: center;
}

#qrcode img {
    border-radius: 8px;
}

/* Instructions */

.instructions {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 24px;
}

.instructions h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step {
    display: flex;
    gap: 14px;
}

.step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #4f46e5);
    color: white;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-content strong {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
}

.step-content p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* App Links */

.app-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.app-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xs);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 13px;
    transition: all var(--transition);
}

.app-link:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.05);
}

.app-platform {
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 4px;
}

/* ===== Error Page ===== */

.error-card {
    max-width: 520px;
}

.error-header {
    text-align: center;
    margin-bottom: 24px;
}

.error-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    color: var(--error);
    margin-bottom: 16px;
    box-shadow: 0 8px 32px var(--error-glow);
}

.error-header h1 {
    font-size: 24px;
    font-weight: 700;
}

.error-message {
    padding: 16px;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-sm);
    margin-bottom: 28px;
}

.error-message p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    text-align: center;
}

.error-info {
    margin-bottom: 28px;
}

.error-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.error-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.error-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
}

.step-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.error-step p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.error-step a {
    color: var(--accent-light);
    text-decoration: none;
}

.error-step a:hover {
    text-decoration: underline;
}

.error-actions {
    display: flex;
    flex-direction: column;
}

/* ===== Responsive ===== */

@media (max-width: 560px) {
    .card {
        padding: 28px 20px;
    }

    .logo-text {
        font-size: 24px;
    }

    .success-card,
    .error-card {
        max-width: 100%;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .detail-value {
        text-align: left;
        max-width: 100%;
    }
}