/* General Styles */
:root {
    --primary-color: #ff0055;
    --primary-hover: #e6004c;
    --secondary-color: #2c2f33;
    --secondary-hover: #3a3d41;
    --modal-bg: rgba(29, 31, 32, 0.95);
    --text-color: #ffffff;
    --footer-color: #888;
    --main-font: 'Rubik', sans-serif;
    --main-bg: linear-gradient(135deg, #1d1f20, #323536);
    --container-padding: 20px;
    --button-padding: 12px 25px;
    --button-font-size: 18px;
    --button-radius: 50px;
    --station-button-padding: 20px;
    --station-button-font-size: 20px;
    --station-button-radius: 10px;
    --video-player-border-radius: 15px;
    --video-player-shadow: 0 4px 15px rgba(0,0,0,0.3);
    --form-bg: #2c2f33;
    --form-border: 1px solid #444;
    --form-input-padding: 10px;
    --form-input-font-size: 16px;
    direction: rtl;
    
}

body {
    direction: rtl;
    text-align: right;
    font-family: var(--main-font);
    background: var(--main-bg);
    color: var(--text-color);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-attachment: fixed;
    overflow-x: hidden;
}

.container {
    padding: var(--container-padding);
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.logo {
    max-width: 150px;
    margin-bottom: 15px;
    width: 100%;
    height: auto;
}

h1, h2 {
    color: var(--text-color);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 28px;
}

/* Buttons */
.btn-custom,
.station-button,
.wish-button {
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    font-weight: 500;
}

.btn-custom {
    background-color: var(--primary-color);
    color: var(--text-color);
    border-radius: var(--button-radius);
    padding: var(--button-padding);
    margin: 5px;
    font-size: var(--button-font-size);
    width: 180px;
}

.btn-custom:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-custom i {
    margin-left: 10px;
}

.station-button {
    background-color: var(--secondary-color);
    color: var(--text-color);
    border-radius: var(--station-button-radius);
    padding: var(--station-button-padding);
    margin: 10px 0;
    font-size: var(--station-button-font-size);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    text-align: center;
    position: relative; /* For positioning the envelope icon */
}

.station-button:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
}

.station-button.active {
    background-color: var(--primary-color);
}

.station-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    border-radius: var(--station-button-radius);
    object-fit: cover;
}

.station-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 5px;
}

.station-content span {
    margin-bottom: 6px;
    font-size: var(--station-button-font-size);
}

.wish-button {
    position: static;
    background-color: var(--primary-color);
    color: var(--text-color);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: all 0.3s ease;
    margin-top: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wish-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.wish-button svg {
    width: 12px;
    height: 12px;
}

.wish-button span {
    font-size: 11px;
    font-weight: 500;
}

/* Sections */
.section {
    display: none;
}

.section.active {
    display: block;
}

/* Player Controls */
.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

#playerButton {
    background-color: var(--primary-color);
    border: none;
    color: var(--text-color);
    border-radius: 50%;
    padding: 15px;
    font-size: 12px;
    margin-right: 15px;
    cursor: pointer;
}

#playerButton:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

#volume {
    width: 180px;
    max-width: 100%;
}

/* Video Player */
.video-player {
    margin-top: 20px;
}

.video-js {
    width: 100%;
    height: auto;
    border-radius: var(--video-player-border-radius);
    box-shadow: var(--video-player-shadow);
}

/* Footer */
footer {
    text-align: center;
    padding: 15px;
    color: var(--footer-color);
    margin-top: 30px;
}

/* Modal Styles */
.modal-content-custom {
    background: var(--modal-bg);
    border: none;
    border-radius: 15px;
    padding: 30px;
    color: var(--text-color);
}

.modal-header-custom {
    border-bottom: none;
    display: flex;
    justify-content: flex-end;
}

.modal-header-custom .btn-close {
    color: var(--text-color);
    opacity: 1;
}

.modal-body-custom {
    text-align: center;
}

/* Add to Home Button */
.add-to-home-btn {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 16px;
    transition: background-color 0.3s, color 0.3s;
    margin-top: 20px;
    cursor: pointer;
}

.add-to-home-btn:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
}

.ios-instructions img {
    width: 20px;
    vertical-align: middle;
}

/* Modal Backdrop */
.modal-backdrop-custom {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Form Styles */
.wish-form-container {
    background-color: var(--form-bg);
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--video-player-shadow);
}

.wish-form-container h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.wish-form-container textarea,
.wish-form-container input[type="text"] {
    width: 100%;
    border-radius: 10px;
    padding: var(--form-input-padding);
    font-size: var(--form-input-font-size);
    margin-bottom: 10px;
    border: var(--form-border);
    background-color: #1d1f20;
    color: #fff;
}

.wish-form-container textarea {
    resize: none;
}

/* Loading Indicator */
.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    z-index: 9999;
    text-align: center;
}

/* Success Message */
.success-message {
    display: none;
    color: var(--primary-color);
    margin-top: 10px;
}

/* Video Recording Styles */
.video-recording-container {
    background-color: #1d1f20;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.video-preview-element {
    width: 100%;
    max-height: 240px;
    background-color: #000;
    border-radius: 8px;
    margin-bottom: 15px;
}

.recording-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.recording-timer {
    background-color: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.2em;
    transition: all 0.3s ease;
}

.recording-timer.warning {
    background-color: rgba(255, 165, 0, 0.1);
    color: #ffa500;
    animation: pulse 1s infinite;
}

.recording-timer.danger {
    background-color: rgba(255, 0, 0, 0.1);
    color: #ff0000;
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.recorded-video-preview {
    width: 100%;
    max-height: 240px;
    background-color: #000;
    border-radius: 8px;
    margin-bottom: 10px;
}

#deleteRecording {
    width: 100%;
    margin-top: 10px;
}

/* Upload Progress Styles */
.upload-progress-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(44, 47, 51, 0.98);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1060;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.upload-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1055;
    display: flex;
    justify-content: center;
    align-items: center;
}

.upload-status {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: #ffffff;
    font-size: 16px;
}

.upload-status i {
    margin-left: 10px;
    color: var(--primary-color);
    animation: spin 1s linear infinite;
}

.progress {
    height: 20px;
    background-color: #2c2f33;
    border-radius: 10px;
    overflow: hidden;
    margin: 15px 0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.progress-bar {
    background: linear-gradient(45deg, var(--primary-color), #ff3366);
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: progress-shine 1.5s infinite;
}

.upload-details {
    color: #888;
    font-size: 14px;
    margin-top: 10px;
}

.upload-error {
    color: #ff4444;
    background-color: rgba(255, 68, 68, 0.1);
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    text-align: center;
}

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

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Добавляем стили для модального окна, чтобы оно не перекрывало индикатор */
.modal {
    z-index: 1050;
}

.modal-backdrop {
    z-index: 1040;
}

/* Специальные стили для модального окна установки приложения */
#addToHomeModal {
    z-index: 1070; /* Выше чем индикатор загрузки */
}

#addToHomeModal + .modal-backdrop {
    z-index: 1065; /* Выше чем индикатор загрузки, но ниже самого модального окна */
}

/* Стили для кнопок переключения радио/видео */
.desktop-buttons {
    margin: 20px 0;
}

.desktop-buttons .btn-custom {
    min-width: 120px;
    padding: 10px 20px;
    font-size: 1.1rem;
    margin: 5px;
}

/* Медиа-запрос для мобильных устройств */
@media (max-width: 768px) {
    .desktop-buttons {
        margin: 15px 0;
    }

    .desktop-buttons .btn-custom {
        width: calc(100% - 20px);
        margin: 5px 10px;
        font-size: 1rem;
        padding: 12px 20px;
        max-width: 300px;
    }

    .desktop-buttons .d-flex {
        gap: 10px;
    }

    .navbar .container-fluid {
        padding: 0 15px;
    }

    #installAppButton {
        font-size: 0.9rem;
        padding: 8px 15px;
    }

    .wish-button {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .wish-button i {
        font-size: 12px;
    }
}

/* Удаляем старые стили для offcanvas меню */
.offcanvas {
    display: none;
}

.offcanvas-header,
.offcanvas-body {
    display: none;
}