/* PVA Redirector - pva.vc */
/* Clean, modern design with blue background and soft rounded shapes */

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Variables */
:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-primary-light: #3b82f6;
    --color-error: #ef4444;
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --color-bg-gradient-start: #3b82f6;
    --color-bg-gradient-end: #1e40af;
    --color-white: #ffffff;
    --color-border: #e2e8f0;
    --radius-card: 32px;
    --radius-input: 50px;
    --radius-btn: 50px;
}

/* Base */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(145deg, var(--color-bg-gradient-start) 0%, var(--color-bg-gradient-end) 100%);
    color: var(--color-text);
    line-height: 1.5;
    min-height: 100%;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Container */
.container {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

/* Card - super rounded like a drop */
.card {
    background: var(--color-white);
    border-radius: var(--radius-card);
    padding: 40px 32px;
    width: 100%;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    text-align: center;
}

/* Typography */
.card-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.card-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 28px;
}

/* Form */
.form {
    width: 100%;
}

.input-wrapper {
    margin-bottom: 16px;
}

/* Input - pill shaped */
.input {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.6rem;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-input);
    background: #f8fafc;
    color: var(--color-text);
    transition: all 0.25s ease;
    caret-color: var(--color-primary);
}

.input::placeholder {
    color: #94a3b8;
    font-weight: 500;
    letter-spacing: 0.4em;
}

.input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-white);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.input-error {
    border-color: var(--color-error);
    animation: shake 0.3s ease;
}

.input-error:focus {
    border-color: var(--color-error);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.error-text {
    color: var(--color-error);
    font-size: 0.875rem;
    margin-top: 10px;
    font-weight: 500;
}

/* Button - pill shaped */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 28px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary-dark) 100%);
    border: none;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.4);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Footer */
.footer {
    padding: 24px 0;
    text-align: center;
}

.footer-link {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: rgba(255, 255, 255, 0.95);
}

/* Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* Loading state */
.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 12px;
}

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

/* Error page styles */
.error-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    color: var(--color-error);
}

.error-icon svg {
    width: 100%;
    height: 100%;
}

.error-icon-warning {
    color: #f59e0b;
}

.card-subtitle strong {
    color: var(--color-text);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    background: #f1f5f9;
    padding: 3px 10px;
    border-radius: 8px;
}

/* Responsive - when keyboard is open on mobile */
@media (max-height: 520px) {
    body {
        justify-content: flex-start;
        padding-top: 16px;
    }

    .card {
        padding: 28px 24px;
        border-radius: 24px;
    }

    .card-title {
        font-size: 1.35rem;
        margin-bottom: 4px;
    }

    .card-subtitle {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .input {
        padding: 14px 20px;
        font-size: 1.35rem;
        border-radius: 40px;
    }

    .btn {
        padding: 14px 24px;
        border-radius: 40px;
    }

    .footer {
        padding: 16px 0;
    }
}

/* Larger screens */
@media (min-width: 480px) {
    .card {
        padding: 48px 40px;
    }

    .card-title {
        font-size: 1.75rem;
    }

    .input {
        font-size: 1.75rem;
        padding: 18px 28px;
    }
}

/* Safe area for notched phones */
@supports (padding: env(safe-area-inset-bottom)) {
    body {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
}
