canvas:focus {
    outline: none;
}

html, body {
    padding: 0;
    margin: 0;
    overflow: hidden;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    height: 100%;
    background: #121212;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#unity-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#unity-canvas {
    width: 100%;
    height: 100%;
    background: #000;
}

/* Modern Loading Screen */
#loading-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    color: white;
    overflow: hidden;
}

/* Arkaplan animasyonu */
#loading-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    animation: backgroundShift 8s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* Logo Container */
.logo-container {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.game-logo {
    width: 200px;
    height: 200px;
    margin: 0 auto 25px auto;
    border-radius: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: logoFloat 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.game-logo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: logoShine 3s ease-in-out infinite;
}

/* Logo image styling */
.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 15px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

/* Alternatif olarak background image kullanmak için */
.game-logo.background-logo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px) scale(1) rotate(0deg);
    }
    33% {
        transform: translateY(-10px) scale(1.02) rotate(1deg);
    }
    66% {
        transform: translateY(-5px) scale(1.01) rotate(-1deg);
    }
}

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

.logo-icon {
    font-size: 48px;
    font-weight: bold;
    background: linear-gradient(135deg, #fff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-title {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: 3px;
    text-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.game-subtitle {
    font-size: 1.1rem;
    color: #cbd5e0;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* Loading Bar Container */
#unity-loading-bar {
    width: 90%;
    max-width: 400px;
    margin-top: 20px;
    position: relative;
    z-index: 2;
}

.loading-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #cbd5e0;
}

.loading-percentage {
    font-weight: 600;
    color: #fff;
}

#unity-progress-bar-empty {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

#unity-progress-bar-full {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#unity-progress-bar-full::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Modern Spinner */
.spinner-container {
    position: relative;
    margin-bottom: 30px;
    z-index: 2;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s linear infinite;
    position: relative;
}

.spinner::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 3px solid transparent;
    border-radius: 50%;
    border-top-color: #764ba2;
    animation: spin 1.5s linear infinite reverse;
}

.spinner::after {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border: 3px solid transparent;
    border-radius: 50%;
    border-top-color: #f093fb;
    animation: spin 2s linear infinite;
}

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

/* Loading Text */
.loading-text {
    margin-top: 25px;
    font-size: 1.1rem;
    color: #e2e8f0;
    text-align: center;
    position: relative;
    z-index: 2;
    font-weight: 300;
}

.loading-dots {
    display: inline-block;
    position: relative;
    width: 20px;
}

.loading-dots::after {
    content: '...';
    position: absolute;
    left: 0;
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Tips */
.loading-tips {
    position: absolute;
    bottom: 40px;
    left: 20px;
    right: 20px;
    text-align: center;
    color: #a0aec0;
    font-size: 0.9rem;
    font-style: italic;
    z-index: 2;
}

.tip-text {
    opacity: 0;
    animation: tipFade 8s ease-in-out infinite;
}

.tip-text:nth-child(1) { animation-delay: 0s; }
.tip-text:nth-child(2) { animation-delay: 4s; }

@keyframes tipFade {
    0%, 100% { opacity: 0; transform: translateY(10px); }
    10%, 90% { opacity: 1; transform: translateY(0); }
}

/* GameDistribution SDK için stil */
#gameDistributionContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
}

#gameDistributionContainer iframe {
    pointer-events: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .game-logo {
        width: 150px;
        height: 150px;
        border-radius: 20px;
    }
    
    .game-title {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }
    
    .game-subtitle {
        font-size: 0.9rem;
        letter-spacing: 3px;
    }
    
    .logo-icon {
        font-size: 32px;
    }
    
    .spinner {
        width: 50px;
        height: 50px;
    }
}