/* ============================================
   GAME-THEMED AUTH PAGES
   Lord of Capital - Epic Login Experience
   ============================================ */

:root {
    --game-purple: #8b5cf6;
    --game-purple-dark: #6d28d9;
    --game-gold: #ffd700;
    --game-gold-dark: #ffa500;
    --game-dark: #0f172a;
    --game-darker: #020617;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    padding-top: calc(40px + env(safe-area-inset-top));
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}
body {
    /* iOS notch için padding */
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

/* Mobile app içinde mi kontrol */
body.mobile-app {
    /* Notch'un altından başla */
    padding-top: env(safe-area-inset-top, 0px);
}

/* Header/Nav için özel ayar (varsa) */
body.mobile-app header,
body.mobile-app nav,
body.mobile-app .header {
    /* Header zaten en üstte ise, notch padding'ini ona ekle */
    padding-top: calc(env(safe-area-inset-top, 0px) + 10px);
}

/* Footer için */
body.mobile-app footer,
body.mobile-app .footer {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
}

/* Sticky header varsa */
body.mobile-app .sticky-header {
    top: env(safe-area-inset-top, 0px);
}


/* Epic Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 10% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(109, 40, 217, 0.08) 0%, transparent 60%);
    animation: epicGlow 20s ease-in-out infinite;
    z-index: 1;
}

@keyframes epicGlow {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.6;
    }

    25% {
        transform: scale(1.1) rotate(5deg);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.15) rotate(-5deg);
        opacity: 1;
    }

    75% {
        transform: scale(1.05) rotate(3deg);
        opacity: 0.7;
    }
}

/* Floating Particles */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(255, 215, 0, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(139, 92, 246, 0.3), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(2px 2px at 80% 10%, rgba(255, 215, 0, 0.3), transparent),
        radial-gradient(1px 1px at 90% 60%, rgba(139, 92, 246, 0.2), transparent);
    background-size: 200% 200%;
    background-position: 0% 0%;
    animation: floatingParticles 30s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes floatingParticles {

    0%,
    100% {
        background-position: 0% 0%, 100% 100%, 50% 50%, 20% 80%, 80% 20%;
    }

    50% {
        background-position: 100% 100%, 0% 0%, 60% 40%, 80% 20%, 20% 80%;
    }
}

.auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 480px;
    margin: auto;
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
    animation: epicEntrance 1s ease-out;
    padding-top: 44px;
}

@keyframes epicEntrance {
    0% {
        opacity: 0;
        transform: translateY(-50px) scale(0.8);
    }

    60% {
        transform: translateY(10px) scale(1.05);
    }

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

.logo {
    font-size: 3.2rem;
    font-weight: 900;
    color: white;
    text-shadow:
        0 0 20px rgba(255, 215, 0, 0.5),
        0 0 40px rgba(139, 92, 246, 0.3),
        0 4px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
    letter-spacing: -2px;
    position: relative;
    display: inline-block;
}

.logo::before {
    content: '👑';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    animation: crownFloat 3s ease-in-out infinite;
}

@keyframes crownFloat {

    0%,
    100% {
        transform: translateX(-50%) translateY(0px);
    }

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

.logo-accent {
    background: linear-gradient(135deg, var(--game-gold) 0%, var(--game-gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: goldShimmer 3s ease-in-out infinite;
}

@keyframes goldShimmer {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.3);
    }
}

.logo-tagline {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 400;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Auth Card - Dark Glass Morphism */
.auth-card {
    background: linear-gradient(135deg,
            rgba(30, 41, 59, 0.95) 0%,
            rgba(15, 23, 42, 0.98) 100%);
    backdrop-filter: blur(30px);
    border-radius: 30px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(139, 92, 246, 0.2),
        inset 0 0 80px rgba(139, 92, 246, 0.05);
    padding: 50px;
    animation: cardEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 215, 0, 0.05) 50%,
            transparent 70%);
    animation: cardShine 8s linear infinite;
    pointer-events: none;
}

@keyframes cardShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }

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

.auth-card-title {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.auth-card-subtitle {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-bottom: 35px;
    font-size: 1rem;
    font-weight: 400;
}

/* Welcome Box - Game Style */
.welcome-box {
    background: linear-gradient(135deg,
            rgba(139, 92, 246, 0.15) 0%,
            rgba(109, 40, 217, 0.15) 100%);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-left: 5px solid var(--game-gold);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.welcome-box h6 {
    color: var(--game-gold);
    font-weight: 800;
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.welcome-box ul {
    margin: 0;
    padding-left: 25px;
    list-style: none;
}

.welcome-box li {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    margin: 10px 0;
    position: relative;
    padding-left: 10px;
}

.welcome-box li::before {
    content: '⚡';
    position: absolute;
    left: -20px;
    color: var(--game-gold);
}

.welcome-box li i {
    color: var(--game-purple);
    margin-right: 8px;
}

/* Form Elements - Dark Theme */
.form-label {
    font-weight: 700;
    color: white;
    font-size: 0.95rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.form-label i {
    color: var(--game-gold);
    margin-right: 5px;
}

.form-control {
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid rgba(139, 92, 246, 0.4);
    border-radius: 15px;
    padding: 14px 18px;
    font-size: 1rem;
    color: white;
    transition: all 0.3s ease;
    font-weight: 500;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-control:focus {
    background: rgba(30, 41, 59, 0.8);
    border-color: var(--game-gold);
    box-shadow:
        0 0 30px rgba(255, 215, 0, 0.3),
        inset 0 0 20px rgba(139, 92, 246, 0.1);
    color: white;
}

.form-control.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.input-group-text {
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid rgba(139, 92, 246, 0.4);
    border-right: none;
    border-radius: 15px 0 0 15px;
    color: var(--game-gold);
    font-size: 1.2rem;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 15px 15px 0;
}

.input-group:focus-within .input-group-text {
    border-color: var(--game-gold);
    background: rgba(30, 41, 59, 0.8);
    color: var(--game-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.input-group:focus-within .form-control {
    border-color: var(--game-gold);
}

/* Epic Button */
.auth-btn,
.btn-primary {
    background: linear-gradient(135deg, var(--game-purple) 0%, var(--game-purple-dark) 100%);
    border: 3px solid rgba(255, 215, 0, 0.5);
    border-radius: 15px;
    padding: 16px;
    font-weight: 800;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: white;
    box-shadow:
        0 10px 40px rgba(139, 92, 246, 0.5),
        0 0 30px rgba(255, 215, 0, 0.3),
        inset 0 -5px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.auth-btn::before,
.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    border-radius: 50%;
}

.auth-btn:hover::before,
.btn-primary:hover::before {
    width: 400px;
    height: 400px;
}

.auth-btn:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, var(--game-gold) 0%, var(--game-gold-dark) 100%);
    border-color: var(--game-gold);
    color: #1F2937;
    transform: translateY(-5px) scale(1.02);
    box-shadow:
        0 15px 50px rgba(255, 215, 0, 0.6),
        0 0 50px rgba(139, 92, 246, 0.4),
        inset 0 0 30px rgba(255, 255, 255, 0.2);
}

.auth-btn:active,
.btn-primary:active {
    transform: translateY(-2px) scale(0.98);
}

.auth-btn i,
.btn-primary i {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Alerts - Game Style */
.alert {
    border-radius: 15px;
    border: 2px solid;
    padding: 18px 22px;
    font-size: 0.95rem;
    font-weight: 600;
    animation: alertSlide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

@keyframes alertSlide {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: linear-gradient(135deg,
            rgba(16, 185, 129, 0.2) 0%,
            rgba(5, 150, 105, 0.2) 100%);
    border-color: #10b981;
    color: #d1fae5;
}

.alert-danger {
    background: linear-gradient(135deg,
            rgba(239, 68, 68, 0.2) 0%,
            rgba(220, 38, 38, 0.2) 100%);
    border-color: #ef4444;
    color: #fee2e2;
}

.alert-info {
    background: linear-gradient(135deg,
            rgba(59, 130, 246, 0.2) 0%,
            rgba(37, 99, 235, 0.2) 100%);
    border-color: #3b82f6;
    color: #dbeafe;
}

.alert i {
    font-size: 1.2rem;
    vertical-align: middle;
}

/* Invalid Feedback */
.invalid-feedback {
    color: #fecaca;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 8px;
    animation: shake 0.5s ease;
}

@keyframes shake {

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

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

/* Auth Links */
.auth-link {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid rgba(139, 92, 246, 0.3);
}

.auth-link a,
.text-decoration-none {
    color: var(--game-gold);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.auth-link a:hover,
.text-decoration-none:hover {
    color: white;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    transform: scale(1.05);
    display: inline-block;
}

/* Form Check (Remember Me) */
.form-check-input {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(139, 92, 246, 0.5);
    background: rgba(30, 41, 59, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background: linear-gradient(135deg, var(--game-purple), var(--game-purple-dark));
    border-color: var(--game-gold);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
}

.form-check-label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    margin-left: 8px;
    cursor: pointer;
}

/* Badge */
.badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* Verification Code Input - Special Style */
input[name="code"],
input[name="verification_code"] {
    text-align: center;
    font-size: 2rem !important;
    letter-spacing: 1rem;
    font-weight: 900;
    background: linear-gradient(135deg,
            rgba(139, 92, 246, 0.2) 0%,
            rgba(109, 40, 217, 0.2) 100%);
    border: 3px solid var(--game-gold);
    box-shadow:
        0 0 30px rgba(255, 215, 0, 0.3),
        inset 0 0 20px rgba(139, 92, 246, 0.2);
    color: var(--game-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

input[name="code"]:focus,
input[name="verification_code"]:focus {
    box-shadow:
        0 0 50px rgba(255, 215, 0, 0.6),
        inset 0 0 30px rgba(139, 92, 246, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .auth-card {
        padding: 35px 25px;
    }

    .logo {
        font-size: 2.5rem;
    }

    .logo::before {
        font-size: 2rem;
        top: -25px;
    }

    .auth-card-title {
        font-size: 1.6rem;
    }

    .auth-btn,
    .btn-primary {
        font-size: 1rem;
        padding: 14px;
    }
}

@media (max-width: 576px) {
    body {
        padding: 20px 10px;
        padding-top: calc(20px + env(safe-area-inset-top));
        align-items: flex-start;
    }

    .auth-card {
        padding: 30px 20px;
        border-radius: 20px;
    }

    .logo {
        font-size: 2rem;
    }

    .logo::before {
        font-size: 1.5rem;
        top: -20px;
    }

    .auth-card-title {
        font-size: 1.4rem;
    }

    .logo-tagline {
        font-size: 0.85rem;
    }

    .welcome-box {
        padding: 20px;
    }

    .auth-btn,
    .btn-primary {
        font-size: 0.95rem;
        padding: 12px;
    }

    input[name="code"],
    input[name="verification_code"] {
        font-size: 1.5rem !important;
        letter-spacing: 0.5rem;
    }
}

/* Loading Animation */
.spinner-border {
    width: 24px;
    height: 24px;
    border-width: 3px;
}

/* Text Colors */
.text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

.text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.text-success {
    color: #10b981;
}

.text-danger {
    color: #ef4444;
}

.text-warning {
    color: var(--game-gold);
}

.text-info {
    color: #3b82f6;
}

/* Small Text */
small {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

small i {
    color: var(--game-gold);
}

/* ============================================
   PAGE LOADER & TRANSITIONS
   ============================================ */

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loader.active {
    opacity: 1;
    visibility: visible;
}

.loader-content {
    text-align: center;
    position: relative;
}

.loader-logo {
    margin-bottom: 30px;
}

.crown-icon {
    font-size: 4rem;
    animation: crownBounce 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
}

@keyframes crownBounce {

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

    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

.loader-text {
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.8);
    letter-spacing: -1px;
}

.loader-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.spinner {
    width: 80px;
    height: 80px;
    border: 5px solid rgba(139, 92, 246, 0.3);
    border-top-color: var(--game-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow:
        0 0 30px rgba(255, 215, 0, 0.5),
        inset 0 0 20px rgba(139, 92, 246, 0.3);
}

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

.loader-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--game-gold);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    animation: particleFloat 3s ease-in-out infinite;
}

.particle:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    top: 80%;
    left: 20%;
    animation-delay: 0.6s;
}

.particle:nth-child(3) {
    top: 20%;
    left: 80%;
    animation-delay: 1.2s;
}

.particle:nth-child(4) {
    top: 80%;
    left: 80%;
    animation-delay: 1.8s;
}

.particle:nth-child(5) {
    top: 50%;
    left: 50%;
    animation-delay: 2.4s;
}

@keyframes particleFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-30px) scale(1.5);
        opacity: 1;
    }
}

/* Page Transition */
.page-transition {
    animation: pageIn 0.5s ease-out;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

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

.page-transition.fade-out {
    animation: pageOut 0.3s ease-in forwards;
}

@keyframes pageOut {
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.98);
    }
}
/* Legal Footer Styling */
.auth-footer {
    position: relative;
    z-index: 10;
    padding-bottom: 20px;
    animation: fadeIn 1s ease-out 0.5s both;
}

.legal-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.legal-link:hover {
    color: var(--game-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    transform: translateY(-2px);
}

.legal-link i {
    font-size: 1rem;
    opacity: 0.8;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
