@font-face {
  font-family: 'mostanad';
  src: url('SOGAND.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

html, body { height:100%; width:100%; height:100vh; width:100vw; margin:0; padding:0; overflow:hidden; }
.fill-viewport { position:fixed; top:0; left:0; right:0; bottom:0; padding:0; margin:0; overflow: hidden; }
.fill-viewport.landscape-left { left: env(safe-area-inset-left); }
.fill-viewport.landscape-right { right: env(safe-area-inset-right); }
#viewer { z-index:1; }
#preloadContainer { z-index:2; opacity:0; background-color:rgba(255,255,255,1); transition: opacity 0.5s; -webkit-transition: opacity 0.5s; -moz-transition: opacity 0.5s; -o-transition: opacity 0.5s;}

/* استایل صفحه intro */
.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1s ease-out;
}

.intro-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.intro-content {
    text-align: center;
    color: white;
    font-family: 'mostanad', Arial, sans-serif;
}

.intro-text {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 50px;
    opacity: 0;
    animation: fadeInOut 3s ease-in-out;
}

.welcome-text {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 50px;
    opacity: 0;
    animation: fadeInStay 2s ease-in-out 3.5s forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(20px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

@keyframes fadeInStay {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

/* استایل موزیک پلیر نواری */
#musicPlayerBar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.1);
    font-family: 'Vazirmatn', Arial, sans-serif;
    transition: transform 0.3s ease;
}

#musicPlayerBar.hidden {
    transform: translateY(100%);
}

.player-container {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: scale(1.1);
}

.control-btn.play-btn {
    background: rgba(255,255,255,0.1);
    width: 45px;
    height: 45px;
    font-size: 20px;
}

.control-btn.play-btn:hover {
    background: rgba(255,255,255,0.2);
}

.control-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.play-btn svg {
    width: 24px;
    height: 24px;
}

.track-info {
    min-width: 200px;
    margin-right: 20px;
}

.track-name {
    font-size: 15px;
    font-weight: 500;
    color: white;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 13px;
    font-weight: 300;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.time-display {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    font-weight: 300;
    min-width: 40px;
}

.progress-bar-wrapper {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-bar-wrapper:hover {
    height: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
    border-radius: 3px;
    width: 0%;
    position: relative;
    transition: width 0.1s;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 20px;
}

.volume-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    padding: 5px;
    font-size: 18px;
}

.volume-btn:hover {
    color: white;
}

.volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.2);
    outline: none;
    border-radius: 2px;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: white;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.toggle-player {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    padding: 5px 10px;
    font-size: 16px;
    transition: all 0.2s;
}

.toggle-player:hover {
    color: white;
}

@keyframes soundWave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}

.sound-wave {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 10px;
}

.sound-wave span {
    width: 3px;
    height: 16px;
    background: #4CAF50;
    border-radius: 2px;
    animation: soundWave 0.8s ease-in-out infinite;
}

.sound-wave span:nth-child(2) {
    animation-delay: 0.2s;
    height: 20px;
}

.sound-wave span:nth-child(3) {
    animation-delay: 0.4s;
    height: 14px;
}

.sound-wave.paused span {
    animation: none;
    background: rgba(255,255,255,0.3);
}

.mini-player {
    position: fixed;
    bottom: 10px;
    right: 20px;
    background: rgba(0,0,0,0.9);
    padding: 10px 15px;
    border-radius: 25px;
    display: none;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    z-index: 100;
    font-family: 'Vazirmatn', Arial, sans-serif;
}

.mini-player.show {
    display: flex;
}

.mini-player .mini-text {
    color: white;
    font-size: 14px;
    font-weight: 400;
}

/* ریسپانسیو برای موبایل */
@media screen and (max-width: 768px) {
    .intro-text {
        font-size: 18px;
        padding: 0 20px;
    }
    
    .welcome-text {
        font-size: 24px;
        padding: 0 20px;
    }
    
    .player-container {
        padding: 8px 10px;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .track-info {
        display: none;
    }
    
    .sound-wave {
        display: none;
    }
    
    .player-controls {
        gap: 5px;
    }
    
    .control-btn {
        padding: 5px;
    }
    
    .control-btn.play-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .progress-container {
        width: 100%;
        order: 2;
        gap: 10px;
    }
    
    .time-display {
        font-size: 11px;
        min-width: 35px;
    }
    
    .volume-container {
        margin-right: 10px;
    }
    
    .volume-slider {
        width: 60px;
    }
}

@media screen and (max-width: 480px) {
    .volume-container {
        display: none;
    }
    
    .player-container {
        padding: 6px 8px;
    }
    
    .control-btn.play-btn {
        width: 35px;
        height: 35px;
    }
}