/* Font Face Declaration */
@font-face {
    font-family: "UdenuaScript";
    src: url("img/EvelinaheartRegular.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

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

body {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: default;
    perspective: 2000px;
    perspective-origin: 50% 50%;
}

#starsCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: none !important;
    /* 2D sistem kapatıldı - sadece 3D */
    pointer-events: auto;
    cursor: grab;
}

.content-container {
    position: relative;
    z-index: 100;
    /* 3D canvas üstünde */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    pointer-events: auto;
    /* Etkileşim açık */
}

.svg-container {
    width: clamp(400px, 70vw, 1000px);
    max-width: 90vw;
    opacity: 1;
    /* DİREKT GÖRÜNÜR */
    transition: opacity 1s ease;
    pointer-events: none;
    user-select: none;
    margin: 0 auto;
    /* ORTALANMIŞ */
}

.svg-container.loaded {
    opacity: 1;
}

/* Blog Butonu - Kapsül */
.blog-button {
    position: relative;
    padding: 1.1rem 3.5rem;
    font-family: "UdenuaScript", cursive;
    font-size: 1.4rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, filter 0.3s ease;
    cursor: pointer;
}

.blog-button:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Cam Katmanı */
.glass-surface {
    position: absolute;
    inset: 0;
    border-radius: 50px;
    background:
        radial-gradient(circle at 30% 30%,
            rgba(255, 255, 255, 0.65) 0%,
            rgba(255, 255, 255, 0.25) 45%,
            rgba(255, 255, 255, 0.05) 72%),
        linear-gradient(145deg,
            rgba(255, 255, 255, 0.45) 0%,
            rgba(200, 220, 255, 0.22) 50%,
            rgba(255, 255, 255, 0.32) 100%),
        rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px) saturate(1.5);
    border: 2.5px solid rgba(255, 255, 255, 0.55);
    box-shadow:
        0 10px 32px rgba(0, 0, 0, 0.45),
        0 0 22px rgba(255, 255, 255, 0.45),
        inset 0 0 26px rgba(255, 255, 255, 0.3),
        inset 0 0 34px rgba(180, 210, 255, 0.22);
    z-index: 4;
    transition: all 0.3s;
    overflow: hidden;
    mix-blend-mode: normal;
    opacity: 0.95;
}

/* Cam kalınlığı ve parlama katmanı */
.glass-surface::before {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 46px;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    box-shadow:
        inset 0 0 20px rgba(255, 255, 255, 0.18),
        inset 0 0 30px rgba(180, 210, 255, 0.14),
        0 0 18px rgba(255, 255, 255, 0.12);
    pointer-events: none;
    mix-blend-mode: screen;
}

.glass-surface::after {
    content: "";
    position: absolute;
    inset: -10%;
    border-radius: 54px;
    background:
        radial-gradient(ellipse at 20% 30%,
            rgba(255, 255, 255, 0.25),
            transparent 45%),
        linear-gradient(110deg,
            rgba(255, 255, 255, 0.16) 0%,
            rgba(255, 255, 255, 0) 35%);
    opacity: 0.9;
    filter: blur(6px);
    pointer-events: none;
    animation: glassSheen 4s ease-in-out infinite;
    mix-blend-mode: screen;
}

@keyframes glassSheen {
    0% {
        transform: translateX(-10%) skewX(-6deg);
        opacity: 0.35;
    }

    50% {
        transform: translateX(8%) skewX(-6deg);
        opacity: 0.7;
    }

    100% {
        transform: translateX(15%) skewX(-6deg);
        opacity: 0.35;
    }
}

/* Yazı */
.btn-text {
    position: relative;
    z-index: 5;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* Hapisteki Yıldızlar */
.captured-stars {
    position: absolute;
    inset: 4px;
    border-radius: 46px;
    z-index: 3;
    overflow: hidden;
    pointer-events: none;
    backdrop-filter: brightness(1.2) saturate(1.1);
    mix-blend-mode: screen;
}

/* Hapisteki Yıldızlar - Gerçekçi Işık Hüzmesi */
.c-star {
    position: absolute;
    background: transparent;
    opacity: 0.9;
    animation: floatInside 3s ease-in-out infinite alternate;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 6px currentColor);
}

/* Dikey Işın */
.c-star::before {
    content: "";
    position: absolute;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom,
            transparent,
            currentColor 50%,
            transparent);
}

/* Yatay Işın ve Merkez Parlama */
.c-star::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right,
            transparent,
            currentColor 50%,
            transparent);
    box-shadow: 0 0 4px 0.5px currentColor;
    border-radius: 50%;
}

/* Kapsülde sıkışan yıldızların patlama öncesi hızlanması */
.captured-stars.bursting .c-star {
    animation: cageBurst 0.5s ease-in-out infinite alternate;
    opacity: 1;
    filter: drop-shadow(0 0 10px currentColor);
}

.captured-stars.bursting {
    animation: cagePulse 0.6s ease-in-out 3;
}

@keyframes cageBurst {
    from {
        transform: scale(1) translate3d(0, 0, 0);
    }

    to {
        transform: scale(1.15) translate3d(0, 0, 10px);
    }
}

@keyframes cagePulse {
    0% {
        box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.25);
    }

    50% {
        box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.35);
    }

    100% {
        box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.25);
    }
}

.breaker-s.content-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    /* 3D canvas'ın ÜSTÜNDEolması için yüksek z-index */
    text-align: center;
    pointer-events: none;
    width: 90%;
    max-width: 800px;
}

.breaker-star-container {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
}

.breaker-star {
    position: absolute;
    width: 140px;
    height: 2px;
    right: 0;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4) 50%,
            white);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    transform: translate(-50%, -50%) rotate(var(--angle, 0deg));
    transform-origin: center right;
}

/* Kuyruklu Yıldızın Başı */
.breaker-star::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px 2px white;
}

/* Cam Parçaları */
.shards {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    display: none;
}

.shard {
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(4px);
}

/* Uzaya süzülen ana kapsül parçası */
.glass-shell {
    position: fixed;
    border-radius: 50px;
    pointer-events: none;
    mix-blend-mode: screen;
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.45));
    z-index: 900;
    background:
        radial-gradient(circle at 30% 30%,
            rgba(255, 255, 255, 0.45) 0%,
            rgba(255, 255, 255, 0.14) 45%,
            transparent 70%),
        linear-gradient(145deg,
            rgba(255, 255, 255, 0.28) 0%,
            rgba(200, 220, 255, 0.14) 50%,
            rgba(255, 255, 255, 0.22) 100%);
    backdrop-filter: blur(10px) saturate(1.4);
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.4),
        inset 0 0 22px rgba(255, 255, 255, 0.2),
        inset 0 0 30px rgba(180, 210, 255, 0.15);
}

/* Animasyonlar */

/* 1. Aşama: Butonun görünmesi */
.blog-button.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 2. Aşama: Yıldızın gelişi */
.blog-button.incoming .breaker-star-container {
    opacity: 1;
    transition: transform 0.6s cubic-bezier(0.1, 0.6, 0.2, 1);
    transform: translate(0, 0) !important;
}

/* 3. Aşama: Kırılma */
.blog-button.broken .glass-surface {
    opacity: 0;
    transform: scale(1.1);
    transition: all 0.1s ease-out;
}

.blog-button.broken .captured-stars {
    opacity: 0;
}

.blog-button.broken .breaker-star-container {
    opacity: 0;
}

.blog-button.broken .btn-text {
    animation: textGlitch 0.3s ease-out;
}

@keyframes textGlitch {
    0% {
        transform: translate(0, 0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(2px, -2px);
    }

    60% {
        transform: translate(-2px, 0);
    }

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

/* JS ile oluşturulacak serbest parçalar - Gerçekçi Cam */
.glass-shard {
    position: fixed !important;
    display: block !important;
    visibility: visible !important;
    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.8) 0%,
            rgba(220, 235, 255, 0.6) 25%,
            rgba(255, 255, 255, 0.5) 50%,
            rgba(200, 220, 255, 0.4) 75%,
            rgba(255, 255, 255, 0.3) 100%),
        radial-gradient(circle at 30% 30%,
            rgba(255, 255, 255, 0.9) 0%,
            rgba(255, 255, 255, 0.4) 60%);
    border: 3px solid rgba(255, 255, 255, 1) !important;
    border-top: 4px solid rgba(255, 255, 255, 1) !important;
    border-left: 4px solid rgba(255, 255, 255, 1) !important;
    border-right: 2px solid rgba(180, 200, 255, 0.6) !important;
    border-bottom: 2px solid rgba(180, 200, 255, 0.6) !important;
    backdrop-filter: blur(6px) saturate(1.5) brightness(1.4);
    -webkit-backdrop-filter: blur(6px) saturate(1.5) brightness(1.4);
    pointer-events: none;
    z-index: 99999 !important;
    box-shadow:
        0 0 50px rgba(255, 255, 255, 0.9),
        0 0 100px rgba(200, 220, 255, 0.6),
        inset 0 0 30px rgba(255, 255, 255, 0.6),
        inset -15px -15px 40px rgba(150, 180, 255, 0.3),
        0 8px 24px rgba(0, 0, 0, 0.7),
        0 0 0 3px rgba(255, 255, 255, 0.5),
        0 0 35px rgba(255, 255, 255, 0.6);
    transform-style: preserve-3d;
    will-change: transform, opacity, filter;
    filter: brightness(1.6) contrast(1.5) saturate(1.3) drop-shadow(0 0 20px rgba(255, 255, 255, 0.8));
    opacity: 1 !important;
    mix-blend-mode: normal !important;
}

.blog-button.broken .glass-surface {
    opacity: 0;
    transition: opacity 0.05s;
}

.blog-button.broken {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

.free-star {
    position: fixed;
    pointer-events: none;
    z-index: 999;
}

@keyframes floatInside {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(3px, 3px);
    }
}

@keyframes escapeAndBreak {
    0% {
        transform: translate(var(--ix), var(--iy));
        opacity: 1;
    }

    100% {
        transform: translate(var(--ex), var(--ey));
        opacity: 0;
    }
}

@keyframes shardFly {
    0% {
        transform: translate(var(--sx), var(--sy)) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translate(var(--fx), var(--fy)) rotate(var(--rot));
        opacity: 0;
    }
}

/* Shake Animasyonu */
@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.logo-outline {
    display: none;
}

.logo-stroke {
    display: none;
}

.logo-fill {
    opacity: 0;
    filter: drop-shadow(0 0 15px rgba(255, 107, 53, 0.4));
    animation: simpleFadeIn 3s ease-out 2s forwards;
    /* 2s gecikme ile başla */
}

@keyframes simpleFadeIn {
    0% {
        opacity: 0;
        filter: drop-shadow(0 0 0px transparent);
    }

    100% {
        opacity: 1;
        filter: drop-shadow(0 0 15px rgba(255, 107, 53, 0.4));
    }
}

/* El yazısı animasyonu - ultra gerçekçi, organik */
@keyframes writeHandwriting {
    0% {
        clip-path: inset(0 100% 0 0);
    }

    1% {
        clip-path: inset(0 99.5% 0 0);
    }

    2% {
        clip-path: inset(0 98.5% 0 0);
    }

    3% {
        clip-path: inset(0 96% 0 0);
    }

    5% {
        clip-path: inset(0 92% 0 0);
    }

    7% {
        clip-path: inset(0 88% 0 0);
    }

    9% {
        clip-path: inset(0 85.5% 0 0);
    }

    11% {
        clip-path: inset(0 85% 0 0);
    }

    13% {
        clip-path: inset(0 84.8% 0 0);
    }

    15% {
        clip-path: inset(0 84.7% 0 0);
    }

    17% {
        clip-path: inset(0 82% 0 0);
    }

    19% {
        clip-path: inset(0 78% 0 0);
    }

    21% {
        clip-path: inset(0 73% 0 0);
    }

    23% {
        clip-path: inset(0 69.5% 0 0);
    }

    25% {
        clip-path: inset(0 69% 0 0);
    }

    27% {
        clip-path: inset(0 68.8% 0 0);
    }

    29% {
        clip-path: inset(0 68.6% 0 0);
    }

    30% {
        clip-path: inset(0 65% 0 0);
    }

    32% {
        clip-path: inset(0 60% 0 0);
    }

    34% {
        clip-path: inset(0 56% 0 0);
    }

    36% {
        clip-path: inset(0 54.5% 0 0);
    }

    38% {
        clip-path: inset(0 54% 0 0);
    }

    40% {
        clip-path: inset(0 53.8% 0 0);
    }

    42% {
        clip-path: inset(0 53.6% 0 0);
    }

    44% {
        clip-path: inset(0 51% 0 0);
    }

    47% {
        clip-path: inset(0 47% 0 0);
    }

    50% {
        clip-path: inset(0 43% 0 0);
    }

    53% {
        clip-path: inset(0 40% 0 0);
    }

    55% {
        clip-path: inset(0 39% 0 0);
    }

    57% {
        clip-path: inset(0 38.8% 0 0);
    }

    59% {
        clip-path: inset(0 38.5% 0 0);
    }

    61% {
        clip-path: inset(0 35% 0 0);
    }

    63% {
        clip-path: inset(0 30% 0 0);
    }

    65% {
        clip-path: inset(0 25% 0 0);
    }

    67% {
        clip-path: inset(0 22% 0 0);
    }

    69% {
        clip-path: inset(0 21% 0 0);
    }

    71% {
        clip-path: inset(0 20.8% 0 0);
    }

    73% {
        clip-path: inset(0 20.5% 0 0);
    }

    74% {
        clip-path: inset(0 17% 0 0);
    }

    76% {
        clip-path: inset(0 12% 0 0);
    }

    78% {
        clip-path: inset(0 8% 0 0);
    }

    81% {
        clip-path: inset(0 4% 0 0);
    }

    84% {
        clip-path: inset(0 2% 0 0);
    }

    87% {
        clip-path: inset(0 1% 0 0);
    }

    91% {
        clip-path: inset(0 0.3% 0 0);
    }

    95% {
        clip-path: inset(0 0.1% 0 0);
    }

    100% {
        clip-path: inset(0 0% 0 0);
    }
}

/* El titremesi - yazarken doğal hareket */
@keyframes handTremor {

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

    3% {
        transform: translate(0.3px, -0.2px) rotate(0.1deg);
    }

    7% {
        transform: translate(-0.2px, 0.3px) rotate(-0.08deg);
    }

    11% {
        transform: translate(0.25px, 0.15px) rotate(0.06deg);
    }

    17% {
        transform: translate(-0.15px, -0.25px) rotate(-0.1deg);
    }

    23% {
        transform: translate(0.3px, 0.2px) rotate(0.09deg);
    }

    30% {
        transform: translate(-0.25px, 0.1px) rotate(-0.07deg);
    }

    38% {
        transform: translate(0.2px, -0.15px) rotate(0.08deg);
    }

    44% {
        transform: translate(-0.1px, 0.25px) rotate(-0.09deg);
    }

    50% {
        transform: translate(0.15px, -0.2px) rotate(0.06deg);
    }

    57% {
        transform: translate(-0.2px, 0.15px) rotate(-0.1deg);
    }

    63% {
        transform: translate(0.25px, 0.25px) rotate(0.08deg);
    }

    69% {
        transform: translate(-0.15px, -0.1px) rotate(-0.06deg);
    }

    76% {
        transform: translate(0.3px, 0.2px) rotate(0.1deg);
    }

    84% {
        transform: translate(-0.2px, 0.3px) rotate(-0.08deg);
    }

    91% {
        transform: translate(0.1px, -0.15px) rotate(0.05deg);
    }
}

/* Silgi animasyonu - sağdan sola sil */
.handwriting-fill.erase {
    animation: eraseHandwriting 3s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

@keyframes eraseHandwriting {
    0% {
        clip-path: inset(0 0% 0 0);
    }

    15% {
        clip-path: inset(0 0% 0 20%);
    }

    20% {
        clip-path: inset(0 0% 0 21%);
    }

    35% {
        clip-path: inset(0 0% 0 39%);
    }

    40% {
        clip-path: inset(0 0% 0 40%);
    }

    55% {
        clip-path: inset(0 0% 0 54%);
    }

    60% {
        clip-path: inset(0 0% 0 55%);
    }

    70% {
        clip-path: inset(0 0% 0 69%);
    }

    75% {
        clip-path: inset(0 0% 0 70%);
    }

    85% {
        clip-path: inset(0 0% 0 85%);
    }

    90% {
        clip-path: inset(0 0% 0 86%);
    }

    98% {
        clip-path: inset(0 0% 0 99%);
    }

    100% {
        clip-path: inset(0 0% 0 100%);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .svg-container {
        width: clamp(400px, 90vw, 900px);
    }

    .content-container {
        gap: 2.5rem;
    }

    .tagline {
        font-size: 1.1rem;
        max-width: 85vw;
    }
}

@media (max-width: 480px) {
    .svg-container {
        width: 96vw;
        max-width: 96vw;
    }

    .content-container {
        gap: 1.5rem;
    }

    .blog-button {
        padding: 0.85rem 2.2rem;
        font-size: 1rem;
    }

    .tagline {
        font-size: 1rem;
        max-width: 92vw;
        padding: 0 1rem;
    }
}

/* Blog Buton - Yeni, Minimalist ve Modern */
/* Blog Buton - Yeni, Minimalist ve Modern */
.blog-btn {
    margin-top: 1rem;
    padding: 12px 36px;
    background: rgba(255, 255, 255, 0.05);
    /* Şeffaf kapsül */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Inter', sans-serif;
    /* Modern sans-serif */
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    z-index: 100;

    /* Başlangıçta gizli */
    /* Başlangıçta gizli */
    transition: all 0.3s ease;
    /* İki animasyon: 1. Fade In (gecikmeli), 2. Gradient Shift (sürekli) */
    animation: buttonFadeIn 2s ease-out 4s forwards, gradientShift 3s ease infinite;
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
    opacity: 0;
    /* Başlangıçta 0 */
    transform: translateY(20px);
    /* Hafif aşağıdan gelsin */
}

@keyframes buttonFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-btn.visible {
    opacity: 1;
    transform: translateY(0);
}

.blog-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

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

/* Tıklayınca kaybolma efekti (fade out) */
.content-container.fade-out {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.5s ease-in-out;
}