.level-up-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001; /* Main UI elementlerinin üzerinde olması için artırıldı */

    /* transform: scale(0.5); */
}

.level-up-container {
    position: relative;
    width: 90%;
    max-width: 400px;
    height: auto;
    min-height: 450px; /* Minimum yükseklik ekle */
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible; /* Container dışına taşan elementleri göster */
    padding: 15px; /* İç boşluğu azalt */
    box-sizing: border-box; /* Padding'i genişliğe dahil et */
}

/* Üst kısım - Level Up yazısı ve yıldız */
.level-up-header {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

/* Level Star için dönme animasyonu */
@keyframes rotateStar {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.level-star {
    width: 120px;
    height: 120px;
    position: relative;
    z-index: 2;
    animation:
        slideFromLeft 1s ease-out forwards,
        rotateStar 8s infinite linear 1s;
}

/* Level numarası için yumuşak, sonsuz döngülü animasyon */
@keyframes pulseNumber {
  0% {
    transform: translate(-50%, -50%) scale(1);
    text-shadow: 0px 0px 2px rgba(255, 255, 255, 0.5);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.15);
    text-shadow: 0px 0px 8px rgba(255, 255, 255, 0.8), 0px 0px 12px rgba(0, 102, 204, 0.6);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    text-shadow: 0px 0px 2px rgba(255, 255, 255, 0.5);
  }
}

/* Level numarası için 0'dan başlayan zoom animasyonu - 1 saniyede tamamlanacak */
@keyframes zoomInNumber {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

/* Level numarası için hem giriş hem pulse animasyonu */
.level-up-level-number {
    position: absolute;
    top: 43.5%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #003366;
    font-size: 24px;
    font-weight: bold;
    z-index: 3;
    text-align: center;
    text-shadow: 0px 0px 2px rgba(255, 255, 255, 0.5);
    animation:
        zoomInNumber 1s ease-out forwards,
        pulseNumber 2s infinite ease-in-out 1s;
}

/* Ters dönme animasyonunu kaldırdım */

.blue-rectangle {
    width: 100%;
    height: 45px;
    position: relative;
    margin-top: -22px;
    z-index: 1;
    left: 0; /* Sol konumlandırmayı sıfırla */
    right: 0; /* Sağ konumlandırmayı sıfırla */
    margin-left: auto; /* Otomatik margin ile ortala */
    margin-right: auto; /* Otomatik margin ile ortala */
}

/* Level Up yazısı için zoom animasyonu */
@keyframes zoomInText {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Level Up yazısı için yeni animasyon */
@keyframes levelUpRising {
  0% {
    transform: scale(1) translateY(0px);
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.4);
    letter-spacing: normal;
  }
  50% {
    transform: scale(1.05) translateY(-5px);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.7), 0 0 16px rgba(255, 255, 255, 0.5), 0 0 24px rgba(0, 153, 255, 0.4);
    letter-spacing: 1px;
  }
  100% {
    transform: scale(1) translateY(0px);
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.4);
    letter-spacing: normal;
  }
}

/* Level Up yazısı için hem giriş hem shine animasyonu */
.level-up-text {
    position: absolute;
    bottom: 8px;
    color: white;
    font-size: 20px;
    font-weight: bold;
    z-index: 2;
    transform: translateX(-50%);
    transform-origin: center center;
    text-align: center;
    width: 100%;
    margin-left: 0; /* Herhangi bir margin'i kaldır */
    padding-left: 0; /* Herhangi bir padding'i kaldır */
    right: auto; /* Sağ konumlandırmayı devre dışı bırak */
    animation:
        zoomInText 1s ease-out forwards,
        levelUpRising 2s infinite ease-in-out 1s;
}

/* Orta kısım - Available yazısı ve kilit görseli */
.level-up-middle {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

.available-text {
    color: white;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    display: inline-block;
}

.available-text::before {
    content: "";
    display: block;
    width: 100%;
    height: 40px;
    background-image: url('./sprites/main/OpacityRectangle.png');
    background-size: cover;
    background-repeat: no-repeat;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    width: 100%;
    min-width: 300px;
}

.area-container {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.area-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Alt kısım - Rewards yazısı ve para görseli */
.level-up-bottom {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rewards-text {
    color: white;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 3px;
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    display: inline-block;
}

.rewards-text::before {
    content: "";
    display: block;
    width: 100%;
    height: 40px;
    background-image: url('./sprites/main/OpacityRectangle.png');
    background-size: cover;
    background-repeat: no-repeat;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    width: 100%;
    min-width: 300px;
}

.level-up-money-container {
    position: relative;
    width: 100px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 5px;
}

.level-up-money-image {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: -1;
}

.level-up-money-amount {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 22px;
    font-weight: bold;
    z-index: 3;
    background-color: rgba(0, 0, 0, 0.394);
    padding: 2px 15px 2px 35px;
    border-radius: 10px;
    min-width: 70px;
    text-align: center;
    height: 32px;
    line-height: 32px;
    box-sizing: border-box;
}

.level-up-money-amount::before {
    content: "";
    display: block;
    width: 40px;
    height: 40px;
    background-image: url('./sprites/main/money.png');
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
}

/* Get butonu için pulse animasyonu - tamamen yeni tanımlama */
@keyframes pulseButton {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Get butonu container'ı için stil */
.get-button-container {
    position: relative;
    width: 160px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 15px;
    /* Tüm animasyonları kaldır */
    animation: none;
}

/* Get butonunun kendisi için animasyon */
.get-button {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Sadece pulse animasyonu uygula */
    animation: pulseButton 1.2s infinite ease-in-out;
    transform-origin: center center;
}

/* Get yazısı için stil */
.get-text {
    position: absolute;
    left: 55px;
    color: #00526D;
    font-size: 20px;
    font-weight: bold;
    /* Animasyonu buton ile senkronize et */
    animation: pulseButton 1.2s infinite ease-in-out;
    transform-origin: center center;
}

/* Video ikonu için stil */
.video-icon {
    position: absolute;
    left: 25px;
    width: 20px;
    height: 20px;
    /* Animasyonu buton ile senkronize et */
    animation: pulseButton 1.2s infinite ease-in-out;
    transform-origin: center center;
}

/* Hover durumunda tüm animasyonları durdur */
.get-button-container:hover .get-button,
.get-button-container:hover .get-text,
.get-button-container:hover .video-icon {
    animation-play-state: paused;
    transform: scale(1.1);
}

/* Claim butonu */
.claim-button-container {
    position: relative;
    width: 90px;
    height: 30px;
    background-color: #33333372;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin-top: 0px;
    margin-bottom: 0px;
}

.claim-text {
    color: white;
    font-size: 16px;
    font-weight: bold;
}

/* Mobil cihazlar için uyarlama */
@media (max-width: 768px) {
    .level-up-container {
        width: 95%;
        max-width: 350px;
        min-height: 400px;
        padding: 12px;
    }

    .level-star {
        width: 120px;
        height: 120px;
    }

    .level-up-level-number {
        font-size: 24px;
    }

    .level-up-text {
        font-size: 20px;
    }

    .available-text,
    .rewards-text {
        font-size: 18px;
    }

    .level-up-money-container {
        width: 100px;
        height: 70px;
    }

    .level-up-money-amount {
        font-size: 18px;
        height: 28px;
        line-height: 28px;
        padding: 2px 12px 2px 30px;
    }

    .level-up-money-amount::before {
        width: 32px;
        height: 32px;
        left: -12px;
    }

    .get-button-container {
        width: 140px;
        height: 45px;
    }

    .get-text {
        font-size: 18px;
        left: 50px;
    }

    .video-icon {
        width: 18px;
        height: 18px;
        left: 22px;
    }

    .blue-rectangle {
        width: 100vw;
        transform: translateX(-50%);
        margin-left: 0;
        margin-right: 0;
    }

    .available-text::before,
    .rewards-text::before {
        width: 100vw;
        min-width: 100vw;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .level-up-header,
    .level-up-middle,
    .level-up-bottom {
        width: 100%;
    }

    .level-up-text,
    .available-text,
    .rewards-text {
        width: 100%;
        text-align: center;
    }
}

/* Daha küçük mobil cihazlar için */
@media (max-width: 480px) {
    .level-up-container {
        width: 98%;
        max-width: 300px;
        min-height: 380px;
        padding: 8px;
    }

    .level-star {
        width: 100px;
        height: 100px;
    }

    .level-up-level-number {
        font-size: 20px;
    }

    .level-up-text {
        font-size: 18px;
    }

    .available-text,
    .rewards-text {
        font-size: 16px;
    }

    .level-up-money-container {
        width: 80px;
        height: 60px;
    }

    .level-up-money-amount {
        font-size: 16px;
        height: 26px;
        line-height: 26px;
        padding: 2px 10px 2px 25px;
    }

    .level-up-money-amount::before {
        width: 28px;
        height: 28px;
        left: -10px;
    }

    .get-button-container {
        width: 120px;
        height: 40px;
    }

    .get-text {
        font-size: 16px;
        left: 42px;
    }

    .video-icon {
        width: 16px;
        height: 16px;
        left: 18px;
    }

    .blue-rectangle {
        width: 100vw;
        transform: translateX(-50%);
    }

    .available-text::before,
    .rewards-text::before {
        width: 100vw;
        min-width: 100vw;
    }
}

/* Panel açılış animasyonları - daha yumuşak bounce ve shake efektleri */
@keyframes slideFromTopBounce {
    0% { transform: translateY(-150%) scale(0.9); opacity: 0; }
    70% { transform: translateY(5%) scale(1.05); opacity: 1; }
    85% { transform: translateY(-2%) scale(0.98); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes slideFromBottomBounce {
    0% { transform: translateY(150%) scale(0.9); opacity: 0; }
    70% { transform: translateY(-5%) scale(1.05); opacity: 1; }
    85% { transform: translateY(2%) scale(0.98); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes slideFromLeftBounce {
    0% { transform: translateX(-150%) scale(0.9); opacity: 0; }
    70% { transform: translateX(5%) scale(1.05); opacity: 1; }
    85% { transform: translateX(-2%) scale(0.98); opacity: 1; }
    100% { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes slideFromRightBounce {
    0% { transform: translateX(150%) scale(0.9); opacity: 0; }
    70% { transform: translateX(-5%) scale(1.05); opacity: 1; }
    85% { transform: translateX(2%) scale(0.98); opacity: 1; }
    100% { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes zoomInBounce {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.05); opacity: 1; }
    85% { transform: scale(0.98); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Desktop için responsive ayarlar */
@media (hover: hover) and (pointer: fine) {
    .level-up-container {
        width: 72%; /* %20 küçültme: 90% * 0.8 = 72% */
        max-width: 320px; /* %20 küçültme: 400px * 0.8 = 320px */
        min-width: 280px;
        transform: scale(1);
        box-sizing: border-box;
    }
}

/* Animasyonları UI elemanlarına uygulama - daha yumuşak geçişler */
.level-up-container {
    animation: zoomInBounce 0.8s ease-out forwards;
}

.level-up-header {
    animation: slideFromTopBounce 1s ease-out forwards;
}

.level-star {
    animation: 
        slideFromLeftBounce 1s ease-out forwards,
        rotateStar 8s infinite linear 1s;
}

.blue-rectangle {
    animation: slideFromRightBounce 1s ease-out forwards;
}

/* Level Up yazısı için sadece zoom animasyonu */
.level-up-text {
    animation: 
        zoomInText 1s ease-out forwards,
        levelUpRising 2s infinite ease-in-out 1s;
}

.level-up-middle {
    animation: slideFromLeftBounce 1s ease-out forwards;
}

.available-text {
    animation: slideFromLeftBounce 1s ease-out forwards;
}

.area-container {
    animation: zoomInBounce 1s ease-out forwards;
}

.level-up-bottom {
    animation: slideFromRightBounce 1s ease-out forwards;
}

.rewards-text {
    animation: slideFromRightBounce 1s ease-out forwards;
}

.level-up-money-container {
    animation: zoomInBounce 1s ease-out forwards;
}

.get-button-container, .claim-button-container {
    animation: slideFromBottomBounce 1s ease-out forwards;
}

/* Diğer UI elemanları için giriş animasyonları */
.level-up-container, .level-up-header, .level-star, .level-up-level-number,
.blue-rectangle, .level-up-text, .level-up-middle, .available-text,
.area-container, .level-up-bottom, .rewards-text, .level-up-money-container,
.claim-button-container {
    animation-fill-mode: forwards;
}
