.recording_view_wrapper {
    padding: 20px;
}
.recording_header {
    display: block;
    margin: 20px 0;
    position: relative;
}
.recording_header h1 {
    font-size: 24px;
    font-weight: 500;
    color: #333;
    margin: 0;
}
.content_inner {
    padding: 0 30px;
    margin: 0;
}
.recording_actions {
    width: 220px;
    display: block;
    position: absolute;
    right: 20px;
    top: 20px;
}
.events_list .camera_info {
    position: relative;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.events_list .camera_info h2 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 500;
}
.recording_details {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 14px;
}
.recording_type {
    padding: 4px 8px;
    font-size: 12px;
    background: #e5e5e5;
}
.recording_type.motion {
    background: #e3f2fd;
    color: #1976d2;
}
.recording_type.continuous {
    background: #f3e5f5;
    color: #7b1fa2;
}
.action_btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border: none;
    background: #f5f5f5;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 4px;
    margin-bottom: 10px;
    width: 100%;
}
.action_btn:hover {
    background: #e5e5e5;
}
.action_btn .icon {
    font-size: 16px;
}

.action_btn.download {
    color: #1976d2;
}

.action_btn.delete {
    color: #d32f2f;
}

.recording_content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.video_container {
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}

.video_placeholder {
    aspect-ratio: 16/9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    gap: 10px;
    position: relative;
}
.video_placeholder video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.video_placeholder video::-webkit-media-controls {
    display: none; /* Стандартные элементы управления отключены. */
}
.camera_name {
    font-size: 18px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}
.camera_details {
    font-size: 14px;
    color: #ccc;
    position: relative;
    z-index: 1;
}
.video_controls {
    background: #f5f5f5;
    padding: 30px 15px;
}
.timeline {
    position: relative;
    height: 4px;
    background: #ddd;
    margin-bottom: 15px;
    border-radius: 2px;
    cursor: pointer;
}
.progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: #1976d2;
    border-radius: 2px;
    cursor: pointer;
}
#videoPlayer::-webkit-media-controls {
    display:none !important;
}
.events {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.event_marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #f44336;
    border-radius: 50%;
    cursor: pointer;
}

.event_tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 8px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    display: none;
}

.event_marker:hover .event_tooltip {
    display: block;
}

.event_time {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.event_type {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}
.event_description {
    font-size: 12px;
    color: #666;
}
.controls {
    display: flex;
    align-items: center;
    gap: 15px;
}
.control_btn {
    height: 42px;
    border: none;
    background: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}
.control_btn:hover {
    background: #444;
}
.time {
    width: 130px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.volume {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume_slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    background: #ddd;
    outline: none;
    border-radius: 2px;
}

.volume_slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #1976d2;
    cursor: pointer;
    border-radius: 50%;
}

.events_list {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
}

.events_list h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 500;
}

.events_timeline {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.event_item {
    display: flex;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #E0E0E0;
}

.event_item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.event_time {
    min-width: 80px;
    font-size: 14px;
    color: #666;
}

.event_content {
    flex: 1;
}

.event_type {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.event_description {
    font-size: 14px;
    color: #666;
}

@media (max-width: 1000px) {
    .recording_content {
        grid-template-columns: 1fr;
    }

    .recording_header {
        flex-direction: column;
        gap: 15px;
    }

    .recording_actions {
        width: 100%;
        position: static;
        margin-top: 20px;
    }

    .action_btn {
        flex: 1;
        justify-content: center;
    }
}

.camera_settings_wrapper {
    padding: 40px 0;
}

.camera_settings_header {
    display: block;
    align-items: center;
    margin-bottom: 30px;
}

.camera_settings_header h1 {
    font-size: 32px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.camera_status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #666;
}

.status_dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4CAF50;
}

.camera_settings_grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.camera_preview {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.camera_preview video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.settings_tabs {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.tabs_header {
    display: flex;
    border-bottom: 1px solid #ddd;
    background: #f5f5f5;
}

.tab_btn {
    padding: 12px 20px;
    font-size: 14px;
    color: #666;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab_btn:hover {
    color: #333;
    background: #e5e5e5;
}

.tab_btn.active {
    color: #1976d2;
    border-bottom: 2px solid #1976d2;
    background: #fff;
}

.tabs_content {
    padding: 20px;
}

.tab_pane {
    display: none;
}

.tab_pane.active {
    display: block;
}

.settings_group {
    margin-bottom: 30px;
}

.settings_group:last-child {
    margin-bottom: 0;
}

.settings_group h3 {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 0 0 20px 0;
}

.setting_item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.setting_item:last-child {
    margin-bottom: 0;
}

.setting_item label {
    flex: 1;
    font-size: 14px;
    color: #666;
}

.setting_item .value {
    width: 50px;
    text-align: right;
    font-size: 14px;
    color: #333;
}

/* Слайдеры */
.slider {
    flex: 1;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    margin: 0 15px;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #1976d2;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* Селекты */
.select {
    flex: 1;
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

/* Расписание */
.schedule_grid {
    display: grid;
    gap: 10px;
}

.schedule_item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.schedule_item .day {
    width: 100px;
    font-size: 14px;
    color: #666;
}

.time_input {
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
}

/* Переключатели */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ddd;
    transition: .4s;
    margin: 0;
}

.switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

.switch input:checked + .slider {
    background-color: #1976d2;
}

.switch input:checked + .slider:before {
    transform: translateX(26px);
}

.switch .slider.round {
    border-radius: 24px;
}

.switch .slider.round:before {
    border-radius: 50%;
}

/* Числовые поля */
.number_input {
    flex: 1;
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
}

/* Кнопки действий */
.settings_actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Responsive design */
@media (max-width: 1200px) {
    .camera_settings_grid {
        grid-template-columns: 1fr;
    }

    .camera_preview {
        max-width: 800px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .camera_settings_header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .tabs_header {
        flex-wrap: wrap;
    }

    .tab_btn {
        flex: 1;
        text-align: center;
        padding: 12px;
        font-size: 14px;
    }

    .setting_item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .setting_item label {
        width: 100%;
    }

    .setting_item .value {
        width: 100%;
        text-align: left;
    }

    .schedule_item {
        flex-direction: column;
        align-items: flex-start;
    }

    .schedule_item .day {
        width: 100%;
    }

    .time_input {
        width: 100%;
    }

    .settings_actions {
        flex-direction: column;
    }

    .settings_actions .btn {
        width: 100%;
    }
}

/* Стили для страницы событий */
.no_events {
    text-align: center;
    padding: 30px;
    color: #666;
    font-size: 14px;
    background: #f5f5f5;
    border-radius: 4px;
}

.event_actions {
    display: flex;
    gap: 10px;
}

.event_actions .action_btn {
    margin: 0;
    width: auto;
    padding: 6px 12px;
    font-size: 13px;
}

.event_actions .action_btn .icon {
    font-size: 14px;
}

/* Анимация для новых событий */
@keyframes highlight {
    0% {
        background-color: rgba(25, 118, 210, 0.1);
    }
    100% {
        background-color: transparent;
    }
}

.event_item.new {
    animation: highlight 2s ease-out;
}

/* Улучшенные стили для списка событий */
.events_timeline {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.events_timeline::-webkit-scrollbar {
    width: 6px;
}

.events_timeline::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.events_timeline::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.events_timeline::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Улучшенные стили для информации о камере */
.camera_info {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.camera_info h2 {
    color: #333;
    font-size: 18px;
    margin-bottom: 10px;
}

.recording_details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.recording_type {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.recording_type.motion {
    background: #e3f2fd;
    color: #1976d2;
}

.recording_type.continuous {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Адаптивные стили */
@media (max-width: 768px) {
    .event_item {
        flex-direction: column;
        gap: 10px;
    }

    .event_actions {
        width: 100%;
    }

    .event_actions .action_btn {
        width: 100%;
        justify-content: center;
    }

    .recording_details {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Стили для страницы фотографий */
.photos_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    padding: 15px 0;
}

.photo_item {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.photo_item:hover {
    transform: translateY(-2px);
}

.photo_thumbnail {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 Aspect Ratio */
    overflow: hidden;
}

.photo_thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo_overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo_item:hover .photo_overlay {
    opacity: 1;
}

.photo_actions {
    display: flex;
    gap: 10px;
}

.photo_actions .action_btn {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.photo_actions .action_btn:hover {
    transform: scale(1.1);
}

.photo_info {
    padding: 10px;
}

.photo_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.photo_header h3 {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.photo_type {
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
}

.photo_type.motion {
    background: #e3f2fd;
    color: #1976d2;
}

.photo_type.sound {
    background: #f3e5f5;
    color: #7b1fa2;
}

.photo_type.temperature {
    background: #fff3e0;
    color: #f57c00;
}

.photo_details {
    font-size: 12px;
    margin-bottom: 6px;
}

.photo_location {
    font-size: 12px;
}

.photo_location .icon {
    font-size: 14px;
}

.no_photos {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: #f5f5f5;
    border-radius: 8px;
    color: #777;
}

/* Адаптивные стили */
@media (max-width: 768px) {
    .photos_grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
        padding: 10px 0;
    }

    .photo_info {
        padding: 8px;
    }

    .photo_header h3 {
        font-size: 13px;
    }

    .photo_details, .photo_location {
        font-size: 11px;
    }
}

.camera-view-wrapper {
    max-width: 700px;
    margin: 30px auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 32px 24px 24px 24px;
}
.camera-view-wrapper h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #222;
}
.camera-video-container {
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 320px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.10);
}
.camera-video-container video {
    width: 100%;
    max-width: 640px;
    max-height: 60vh;
    border-radius: 8px;
    background: #000;
}
