/* ============================================
   AUTH PAGES - Symulator Farmy Online
   Wspólny styl dla: Login, Register,
   ResendAccountInfo, Logout
   ============================================ */

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

:root {
    --auth-primary: #22c55e;
    --auth-primary-dark: #16a34a;
    --auth-primary-glow: rgba(34,197,94,0.25);
    --auth-dark: #0f172a;
    --auth-dark-2: #1e293b;
    --auth-gray: #64748b;
    --auth-white: #ffffff;
    --auth-radius: 16px;
    --auth-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    font-family: var(--auth-font);
    background: var(--auth-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* === Animated background === */
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f2a1a 100%);
    overflow: hidden;
}

.auth-bg::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(34,197,94,0.12) 0%, transparent 70%);
    top: -150px; left: -150px;
    animation: auth-pulse 8s ease-in-out infinite;
}

.auth-bg::after {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(34,197,94,0.08) 0%, transparent 70%);
    bottom: -100px; right: -100px;
    animation: auth-pulse 8s ease-in-out infinite reverse;
}

.auth-bg-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 32px 32px;
}

@keyframes auth-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.7; }
}

/* === Floating particles === */
.auth-particle {
    position: absolute;
    border-radius: 50%;
    background: var(--auth-primary);
    opacity: 0.15;
    animation: auth-float linear infinite;
}

@keyframes auth-float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.15; }
    90% { opacity: 0.15; }
    100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

/* === Layout === */
.auth-wrapper {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* === Split container (Login, Register) === */
.auth-split {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    max-width: 1000px;
    width: 100%;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--auth-radius);
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    animation: auth-slide-up 0.6s cubic-bezier(0.4,0,0.2,1) both;
}

/* === Single card (ResendAccountInfo, Logout) === */
.auth-card {
    max-width: 460px;
    width: 100%;
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--auth-radius);
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    animation: auth-slide-up 0.6s cubic-bezier(0.4,0,0.2,1) both;
}

@keyframes auth-slide-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Brand panel (left side of split) === */
.auth-brand {
    background: linear-gradient(160deg, #0f2a1a 0%, #14532d 50%, #166534 100%);
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(34,197,94,0.2) 0%, transparent 70%);
    top: -80px; right: -80px;
}

.auth-brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.auth-brand-logo-icon {
    width: 44px; height: 44px;
    background: var(--auth-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.auth-brand-logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--auth-white);
    line-height: 1.2;
}

.auth-brand-logo-text span {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-brand-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.auth-brand-icon {
    font-size: 4.5rem;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 0 20px rgba(34,197,94,0.4));
}

.auth-brand-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--auth-white);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.auth-brand-title span {
    background: linear-gradient(135deg, #22c55e, #86efac);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-brand-desc {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.auth-brand-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-brand-feature {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.75);
}

.auth-brand-feature i {
    color: var(--auth-primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.auth-free-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(34,197,94,0.15);
    border: 1px solid rgba(34,197,94,0.3);
    border-radius: 50px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #86efac;
    margin-bottom: 1.5rem;
}

.auth-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.75);
}

.auth-step-num {
    width: 24px; height: 24px;
    background: var(--auth-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--auth-white);
    flex-shrink: 0;
}

/* === Form panel (right side of split) === */
.auth-form-panel {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* === Card header (single card pages) === */
.auth-card-header {
    background: linear-gradient(160deg, #0f2a1a 0%, #14532d 100%);
    padding: 2.5rem 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-card-header::before {
    content: '';
    position: absolute;
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(34,197,94,0.2) 0%, transparent 70%);
    top: -80px; right: -80px;
}

.auth-card-header-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px rgba(34,197,94,0.4));
    display: block;
    position: relative;
    z-index: 1;
}

.auth-card-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--auth-white);
    margin-bottom: 0.4rem;
    position: relative;
    z-index: 1;
}

.auth-card-header p {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.6);
    position: relative;
    z-index: 1;
}

.auth-card-body {
    padding: 2rem 2.5rem 2.5rem;
}

/* === Form header === */
.auth-form-header {
    margin-bottom: 1.75rem;
}

.auth-form-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--auth-white);
    margin-bottom: 0.4rem;
}

.auth-form-header p {
    font-size: 0.875rem;
    color: var(--auth-gray);
}

/* === Form elements === */
.auth-form-group {
    margin-bottom: 1.1rem;
}

.auth-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.45rem;
}

.auth-label-row label,
.auth-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    margin-bottom: 0.45rem;
}

.auth-label-row a {
    font-size: 0.8rem;
    color: var(--auth-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-label-row a:hover { color: #86efac; }

.auth-req { color: #f87171; margin-left: 2px; }

.auth-input-wrapper { position: relative; }

.auth-input-wrapper i.auth-input-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-gray);
    font-size: 1rem;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    padding: 0.75rem 0.875rem 0.75rem 2.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: var(--auth-white);
    font-size: 0.9rem;
    font-family: var(--auth-font);
    transition: all 0.2s;
    outline: none;
}

.auth-input::placeholder { color: var(--auth-gray); }

.auth-input:focus {
    border-color: var(--auth-primary);
    background: rgba(34,197,94,0.05);
    box-shadow: 0 0 0 3px var(--auth-primary-glow);
}

.auth-input-toggle {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-gray);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    transition: color 0.2s;
}

.auth-input-toggle:hover { color: var(--auth-primary); }

/* === Password rules === */
.auth-pass-rules {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
}

.auth-pass-rules-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-pass-rule {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--auth-gray);
    margin-bottom: 0.25rem;
    transition: color 0.2s;
}

.auth-pass-rule:last-child { margin-bottom: 0; }
.auth-pass-rule i { font-size: 0.85rem; transition: color 0.2s; }
.auth-pass-rule.valid { color: var(--auth-primary); }
.auth-pass-rule.valid i { color: var(--auth-primary); }

/* === Info / alert boxes === */
.auth-info-box {
    background: rgba(234,179,8,0.1);
    border: 1px solid rgba(234,179,8,0.25);
    border-radius: 10px;
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    color: #fde68a;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.auth-info-box i { font-size: 1rem; flex-shrink: 0; margin-top: 0.05rem; }

.auth-error-box {
    background: rgba(220,38,38,0.1);
    border: 1px solid rgba(220,38,38,0.3);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: #fca5a5;
    margin-bottom: 1.1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.auth-error-box i { font-size: 1rem; flex-shrink: 0; margin-top: 0.05rem; }

/* === Buttons === */
.auth-btn-primary {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-dark));
    border: none;
    border-radius: 10px;
    color: var(--auth-white);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--auth-font);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(34,197,94,0.3);
    text-decoration: none;
    display: block;
    text-align: center;
}

.auth-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(34,197,94,0.45);
    color: var(--auth-white);
}

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

.auth-btn-secondary {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: rgba(255,255,255,0.7);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--auth-font);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    text-align: center;
}

.auth-btn-secondary:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
    color: var(--auth-white);
}

/* === Divider === */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.08);
}

.auth-divider span { font-size: 0.8rem; color: var(--auth-gray); }

/* === Links === */
.auth-link-row {
    text-align: center;
    font-size: 0.875rem;
    color: var(--auth-gray);
}

.auth-link-row a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-link-row a:hover { color: #86efac; }

.auth-back-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--auth-gray);
}

.auth-back-link a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-back-link a:hover { color: #86efac; }

/* === Terms text === */
.auth-terms {
    font-size: 0.78rem;
    color: var(--auth-gray);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.auth-terms a { color: var(--auth-primary); text-decoration: none; }
.auth-terms a:hover { color: #86efac; }

/* === reCAPTCHA === */
.auth-recaptcha {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

/* === Footer === */
.auth-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.3);
}

/* === Logout specific === */
.auth-logout-header {
    background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
    padding: 3rem 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-logout-header::before {
    content: '';
    position: absolute;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(34,197,94,0.12) 0%, transparent 70%);
    top: -60px; right: -60px;
}

.auth-logout-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: auth-wave 2s ease-in-out infinite;
    display: block;
    position: relative;
    z-index: 1;
}

@keyframes auth-wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.auth-logout-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--auth-white);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.auth-logout-header p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.55);
    position: relative;
    z-index: 1;
}

.auth-logout-message {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.75rem;
    text-align: center;
}

.auth-logout-message p {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
}

.auth-logout-message strong { color: rgba(255,255,255,0.85); }

/* === Responsive === */
@media (max-width: 768px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-form-panel { padding: 2rem 1.5rem; }
    .auth-card-body { padding: 1.5rem; }
}
