/* ============================================
   GOMB ÉS BETÖLTŐ ANIMÁCIÓK - Skill bejelentkezés
   ============================================ */

/* --- BETÖLTŐ OVERLAY --- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    flex-direction: column;
    gap: 30px;
    animation: fadeInOverlay 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-overlay.active {
    display: flex;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- LOGO A BETÖLTŐBEN --- */
.loading-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* --- SPINNER --- */
.loading-spinner-container {
    position: relative;
    width: 70px;
    height: 70px;
}

.loading-spinner-container .spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3.5px solid transparent;
    border-top-color: #26648e;
    border-right-color: #3f8f3f;
    animation: spinLoader 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.loading-spinner-container .spinner-ring:nth-child(2) {
    width: 72%;
    height: 72%;
    top: 14%;
    left: 14%;
    border-top-color: #e6b422;
    border-right-color: #26648e;
    animation-duration: 1.3s;
    animation-direction: reverse;
}

.loading-spinner-container .spinner-ring:nth-child(3) {
    width: 44%;
    height: 44%;
    top: 28%;
    left: 28%;
    border-top-color: #3f8f3f;
    border-right-color: #e6b422;
    animation-duration: 0.7s;
}

@keyframes spinLoader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- SZÖVEG --- */
.loading-text {
    font-family: 'Lexend', sans-serif;
    color: #26648e;
    font-weight: 500;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
    text-align: center;
}

.loading-dots {
    display: inline-block;
}

.loading-dots span {
    display: inline-block;
    animation: dotsAnim 1.4s ease-in-out infinite;
    font-size: 1.5rem;
    font-weight: 700;
    color: #26648e;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}
.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotsAnim {
    0%, 80%, 100% { 
        transform: scale(0.5); 
        opacity: 0.2;
    }
    40% { 
        transform: scale(1.2); 
        opacity: 1;
    }
}

/* --- PROGRESSZÍV CSÍK (alul) --- */
.loading-progress {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #26648e, #3f8f3f, #e6b422, #26648e);
    background-size: 300% 100%;
    animation: progressSlide 2s ease-in-out infinite;
    z-index: 100000;
    width: 0%;
    border-radius: 0 4px 4px 0;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-progress.active {
    width: 100%;
}

@keyframes progressSlide {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 0%; }
    100% { background-position: 0% 0%; }
}

/* --- SUBTEXT (második sor) --- */
.loading-subtext {
    font-family: 'Lexend', sans-serif;
    color: #8a9b96;
    font-size: 0.8rem;
    font-weight: 300;
    margin-top: -16px;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .loading-spinner-container {
        width: 56px;
        height: 56px;
    }
    .loading-text {
        font-size: 0.95rem;
    }
    .loading-logo {
        width: 60px;
        height: 60px;
    }
    .loading-subtext {
        font-size: 0.7rem;
    }
}

/* --- GOMBOK LETILTÁSA BETÖLTÉS KÖZBEN --- */
.btn-primary:disabled,
.btn-success:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   SIKERES BEJELENTKEZÉS ANIMÁCIÓ
   ============================================ */

.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99998;
    flex-direction: column;
    gap: 20px;
    animation: fadeInOverlay 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-overlay.active {
    display: flex;
}

.success-box {
    text-align: center;
    animation: successPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successPop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.check-circle {
    width: 100px;
    height: 100px;
    background: #3f8f3f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 15px 40px rgba(63, 143, 63, 0.3);
}

.check-circle i {
    color: white;
    font-size: 3rem;
    animation: checkAnim 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes checkAnim {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.success-box h3 {
    font-family: 'Lexend', sans-serif;
    color: #26648e;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.success-box p {
    font-family: 'Lexend', sans-serif;
    color: #5f6c6b;
    font-size: 1rem;
}


/* ============================================
   SPINNER A GOMBOKHOZ - tiszta, letisztult
   ============================================ */
/* SPINNER A GOMBOKHOZ - nagyobb és láthatóbb */
.spinner-circle {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spinCircle 0.7s linear infinite;
    vertical-align: middle;
    flex-shrink: 0;
}

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

/* A gomb szövegének középre igazítása spinnerrel */
.btn-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}