/* ============================================
   ByteOmi Editor Geçiş Loading Ekranı
   Softyla.com -> ByteOmi.com Editor
   ============================================ */

/* Loading Overlay - Tam Ekran */
.byteomi-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 25%, rgba(56, 189, 248, 0.12), transparent 55%),
        radial-gradient(circle at 78% 55%, rgba(99, 102, 241, 0.12), transparent 58%),
        radial-gradient(circle at 55% 85%, rgba(244, 114, 182, 0.07), transparent 60%),
        linear-gradient(135deg, #0b1220 0%, #070b14 55%, #0b1220 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.byteomi-transition-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(1px 1px at 20% 30%, rgba(226, 232, 240, 0.16), transparent 60%),
        radial-gradient(1px 1px at 40% 50%, rgba(226, 232, 240, 0.12), transparent 60%),
        radial-gradient(1px 1px at 60% 20%, rgba(226, 232, 240, 0.14), transparent 60%),
        radial-gradient(1px 1px at 80% 70%, rgba(226, 232, 240, 0.10), transparent 60%),
        radial-gradient(1px 1px at 30% 80%, rgba(226, 232, 240, 0.10), transparent 60%),
        radial-gradient(1px 1px at 70% 40%, rgba(226, 232, 240, 0.12), transparent 60%),
        repeating-linear-gradient(0deg,
            rgba(255, 255, 255, 0.02),
            rgba(255, 255, 255, 0.02) 1px,
            transparent 1px,
            transparent 3px);
    opacity: 0.55;
    mix-blend-mode: overlay;
}

.byteomi-transition-overlay>* {
    position: relative;
    z-index: 1;
}

.byteomi-transition-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* Loading Container */
.byteomi-transition-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xl);
    text-align: center;
    max-width: 500px;
    padding: var(--spacing-2xl);
    position: relative;
}

.byteomi-transition-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.10) 0%, transparent 70%);
    animation: byteomiGlow 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes byteomiGlow {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Badge - Mühendislik Laboratuvarı */
.byteomi-transition-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.45),
        0 4px 12px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
    position: relative;
    z-index: 1;
}

.byteomi-transition-badge-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #38bdf8 0%, #6366f1 55%, #0ea5e9 100%);
    border-radius: 10px;
    color: white;
    font-size: 1.125rem;
    box-shadow: 0 1px 3px rgba(124, 156, 255, 0.15);
}

.byteomi-transition-badge-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.byteomi-transition-badge-title {
    font-size: 1rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.5px;
}

.byteomi-transition-badge-subtitle {
    font-size: 0.8125rem;
    color: rgba(226, 232, 240, 0.75);
    font-weight: 500;
}

/* Spinner */
.byteomi-transition-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(226, 232, 240, 0.12);
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: byteomiSpin 1s linear infinite;
    position: relative;
    z-index: 1;
}

@keyframes byteomiSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Text */
.byteomi-transition-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: #e2e8f0;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.byteomi-transition-text .highlight {
    background: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Progress Bar */
.byteomi-transition-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.byteomi-transition-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #38bdf8 0%, #6366f1 50%, #38bdf8 100%);
    border-radius: 2px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.byteomi-transition-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.4) 50%,
            transparent 100%);
    animation: byteomiShine 1.5s ease-in-out infinite;
}

@keyframes byteomiShine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .byteomi-transition-overlay {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    }

    .byteomi-transition-badge {
        background: linear-gradient(135deg, rgba(56, 189, 248, 0.14) 0%, rgba(99, 102, 241, 0.14) 100%);
        border-color: rgba(56, 189, 248, 0.28);
        box-shadow: 0 1px 4px rgba(56, 189, 248, 0.10);
    }

    .byteomi-transition-text {
        color: #e2e8f0;
    }
}

/* ============================================
   Ana Sayfaya Geçiş Loading Ekranı
   Katmanlardan ana sayfaya geçişlerde modern loading ekranı gösterir
   ============================================ */

/* Loading Overlay - Tam Ekran */
.home-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 22% 28%, rgba(56, 189, 248, 0.14), transparent 55%),
        radial-gradient(circle at 78% 55%, rgba(99, 102, 241, 0.14), transparent 58%),
        radial-gradient(circle at 55% 85%, rgba(56, 189, 248, 0.08), transparent 60%),
        linear-gradient(135deg, #0a1020 0%, #070a12 55%, #0a1020 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.home-transition-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(1px 1px at 22% 32%, rgba(226, 232, 240, 0.16), transparent 60%),
        radial-gradient(1px 1px at 46% 58%, rgba(226, 232, 240, 0.12), transparent 60%),
        radial-gradient(1px 1px at 66% 28%, rgba(226, 232, 240, 0.14), transparent 60%),
        repeating-linear-gradient(0deg,
            rgba(255, 255, 255, 0.02),
            rgba(255, 255, 255, 0.02) 1px,
            transparent 1px,
            transparent 3px);
    opacity: 0.55;
    mix-blend-mode: overlay;
}

.home-transition-overlay>* {
    position: relative;
    z-index: 1;
}

.home-transition-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* Loading Container */
.home-transition-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xl);
    text-align: center;
    max-width: 500px;
    padding: var(--spacing-2xl);
    position: relative;
}

.home-transition-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, transparent 70%);
    animation: homeGlow 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes homeGlow {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Badge - Ana Sayfaya Dönüş */
.home-transition-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.45),
        0 4px 12px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
    position: relative;
    z-index: 1;
    animation: homeBadgeFadeIn 0.8s ease-out 0.3s both;
}

@keyframes homeBadgeFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-transition-badge-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #38bdf8 0%, #6366f1 55%, #0ea5e9 100%);
    border-radius: 10px;
    color: white;
    font-size: 1.125rem;
    box-shadow: 0 1px 3px rgba(124, 156, 255, 0.15);
}

.home-transition-badge-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.home-transition-badge-title {
    font-size: 1rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.5px;
}

.home-transition-badge-subtitle {
    font-size: 0.8125rem;
    color: rgba(226, 232, 240, 0.75);
    font-weight: 500;
}

/* Spinner */
.home-transition-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(226, 232, 240, 0.12);
    border-top-color: #38bdf8;
    border-radius: 50%;
    position: relative;
    z-index: 1;
    animation: homeSpin 1s linear infinite, homeSpinnerFadeIn 0.8s ease-out 0.6s forwards;
}

@keyframes homeSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes homeSpinnerFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Text */
.home-transition-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: #e2e8f0;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
    animation: homeTextFadeIn 0.8s ease-out 0.9s both;
}

@keyframes homeTextFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-transition-text .highlight {
    background: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Progress Bar */
.home-transition-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: homeProgressFadeIn 0.8s ease-out 1.1s both;
}

@keyframes homeProgressFadeIn {
    from {
        opacity: 0;
        width: 0;
    }

    to {
        opacity: 1;
        width: 100%;
    }
}

.home-transition-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #38bdf8 0%, #6366f1 50%, #38bdf8 100%);
    border-radius: 2px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.home-transition-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.4) 50%,
            transparent 100%);
    animation: homeShine 1.5s ease-in-out infinite;
}

@keyframes homeShine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .home-transition-overlay {
        background:
            radial-gradient(circle at 22% 28%, rgba(56, 189, 248, 0.14), transparent 55%),
            radial-gradient(circle at 78% 55%, rgba(99, 102, 241, 0.14), transparent 58%),
            radial-gradient(circle at 55% 85%, rgba(56, 189, 248, 0.08), transparent 60%),
            linear-gradient(135deg, #0a1020 0%, #070a12 55%, #0a1020 100%);
    }

    .home-transition-badge {
        background: linear-gradient(135deg, rgba(56, 189, 248, 0.14) 0%, rgba(99, 102, 241, 0.14) 100%);
        border-color: rgba(56, 189, 248, 0.28);
        box-shadow: 0 1px 4px rgba(56, 189, 248, 0.10);
    }

    .home-transition-text {
        color: #e2e8f0;
    }
}

/* Responsive - Mobil */
@media (max-width: 768px) {
    .home-transition-container {
        gap: var(--spacing-lg);
        padding: var(--spacing-lg) var(--spacing-md);
        max-width: 90%;
    }

    .home-transition-badge {
        padding: 0.75rem 1.25rem;
        gap: 0.625rem;
    }

    .home-transition-badge-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .home-transition-badge-title {
        font-size: 0.9375rem;
    }

    .home-transition-badge-subtitle {
        font-size: 0.75rem;
    }

    .home-transition-spinner {
        width: 40px;
        height: 40px;
        border-width: 2.5px;
    }

    .home-transition-text {
        font-size: 1rem;
    }

    .home-transition-progress {
        height: 3px;
    }
}