* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    position: relative;
}


/* Sidebar Styles */

.sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    width: 300px;
    height: 100%;
    background-color: #333;
    color: white;
    transition: left 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #444;
    position: sticky;
    top: 0;
    background-color: #333;
    z-index: 2;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.sidebar-menu {
    padding: 20px;
}

.menu-section {
    margin-bottom: 20px;
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
}

.section-header {
    padding: 15px;
    background-color: #222;
    color: #fff;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #444;
}

.section-header i {
    width: 20px;
    color: #666;
}

.section-content {
    padding: 15px;
}

.control-group {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #333;
    border-radius: 4px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group-header {
    font-size: 13px;
    color: #bbb;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group-header i {
    color: #666;
    width: 16px;
}

.menu-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.menu-item:last-child {
    margin-bottom: 0;
}

.menu-item[data-for] {
    display: none;
}

.menu-item[data-for].active {
    display: flex;
}


/* Gradient type specific display */

.menu-item[data-gradient-type="linear"] {
    display: none;
}

.menu-item[data-gradient-type="linear"].show {
    display: flex;
}

.menu-item span {
    flex: 1;
    font-size: 13px;
    color: #aaa;
}

.menu-item input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

.menu-item input[type="range"]+span {
    margin-left: 10px;
    min-width: 30px;
    display: inline-block;
    text-align: right;
}

.menu-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #888;
    border-radius: 50%;
    cursor: pointer;
}

.menu-item input[type="range"]::-webkit-slider-thumb:hover {
    background: #999;
}

.menu-item select {
    background: #444;
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    width: 120px;
}

.menu-item input[type="color"] {
    width: 40px;
    height: 25px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: none;
    cursor: pointer;
}

.menu-item input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.menu-item input[type="color"]::-webkit-color-swatch {
    border: 1px solid #666;
    border-radius: 4px;
}


/* Switch Toggle Style */

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.switch input:checked+.slider {
    background-color: #4CAF50;
}

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


/* Info Button Style */

.info-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px 10px;
}


/* Bottom Buttons Style */

.bottom-buttons {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-btn {
    background: #444;
    border: none;
    color: white;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
}

.action-btn i {
    width: 20px;
}

.action-btn:hover {
    background: #555;
}


/* Disabled styles */

button:disabled,
input:disabled,
select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.menu-toggle {
    position: fixed;
    left: 20px;
    top: 20px;
    background: #333;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 20px;
    cursor: pointer;
    z-index: 999;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.menu-toggle:hover {
    background-color: #444;
}

.info-button {
    position: fixed;
    right: 20px;
    top: 20px;
    background: #333;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 20px;
    cursor: pointer;
    z-index: 999;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: none;
}

.info-button:hover {
    background-color: #444;
    transform: scale(1.05);
}


/* Container Styles */

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

#spinner {
    width: 100%;
    height: 100%;
    position: relative;
    user-select: none;
    cursor: grab;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#spinner:active {
    cursor: grabbing;
}

#spinner.tablet-view {
    width: 820px;
    height: 1180px;
    border: 2px solid #333;
    border-radius: 20px;
    background: #fff;
}

#spinner.mobile-view {
    width: 390px;
    height: 844px;
    border: 2px solid #333;
    border-radius: 20px;
    background: #fff;
}

#spin-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    transform-origin: center;
    transition: transform 0.1s ease-out;
}

@media (orientation: portrait) {
    #spin-image {
        width: 100vw;
        height: auto;
    }
}

@media (orientation: landscape) {
    #spin-image {
        width: auto;
        height: 100vh;
    }
}

.sub-section {
    border-bottom: 1px solid #444;
}

.sub-section:last-child {
    border-bottom: none;
}

.sub-tab-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background-color: #2a2a2a;
    cursor: pointer;
    user-select: none;
    gap: 10px;
    border-bottom: 1px solid #444;
}

.sub-tab-header i:first-child {
    width: 20px;
    color: #666;
}

.sub-tab-header span {
    flex: 1;
    font-size: 13px;
    color: #bbb;
}

.sub-tab-header i.fa-chevron-down {
    transition: transform 0.3s ease;
    font-size: 12px;
    color: #666;
}

.sub-tab-header.active i.fa-chevron-down {
    transform: rotate(180deg);
}

.sub-tab-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #2a2a2a;
    padding: 0 15px;
}

.sub-tab-content.active {
    max-height: 500px;
    transition: max-height 0.5s ease-in;
    padding: 15px;
}

.sub-tab-content .menu-item {
    margin-bottom: 12px;
}

.sub-tab-content .menu-item:last-child {
    margin-bottom: 0;
}


/* Modal Base Styles */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.active {
    display: flex !important;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #2a2a2a;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    position: relative;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.modal-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}


/* Özel scrollbar stilleri */

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #222;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 15px;
    background: #333;
    border-radius: 8px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item i {
    font-size: 20px;
    color: #666;
    margin-right: 15px;
    margin-top: 3px;
}

.info-text {
    flex: 1;
}

.info-text h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #bbb;
}

.info-text p {
    margin: 0;
    font-size: 14px;
    color: #888;
    line-height: 1.4;
}

.product-features {
    margin: 10px 0 0 0;
    padding-left: 20px;
    color: #888;
    font-size: 14px;
}

.product-features li {
    margin-bottom: 5px;
}

.product-features li:last-child {
    margin-bottom: 0;
}


/* Modal animasyonu */

.modal.active .modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/* Mobil için düzenlemeler */

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    .info-item {
        padding: 12px;
    }
    .info-item i {
        font-size: 18px;
    }
    .info-text h4 {
        font-size: 15px;
    }
    .info-text p {
        font-size: 13px;
    }
}


/* Preview Modal Specific Styles */

.preview-modal .modal-content {
    position: relative;
    background: #2a2a2a;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    max-height: 90vh;
    max-width: 90vw;
}

.preview-content {
    position: relative;
    transform-origin: center;
}

.preview-header {
    cursor: move;
    user-select: none;
    background: #2a2a2a;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #3a3a3a;
}

.preview-header h3 {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    margin: 0;
    opacity: 0.9;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    opacity: 0.6;
    cursor: pointer;
    padding: 4px;
    transition: opacity 0.2s;
    font-size: 18px;
}

.modal-close:hover {
    opacity: 1;
}

.preview-container {
    background: #1a1a1a;
    position: relative;
    overflow: hidden;
}

#preview-spinner {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#preview-image {
    max-width: 100%;
    height: auto;
    display: block;
    user-select: none;
    pointer-events: none;
}


/* Device Specific Styles */

.preview-modal[data-device="tablet"] .preview-content {
    width: 820px;
    height: 1180px;
}

.preview-modal[data-device="tablet"] .preview-container {
    width: 820px;
    height: 1180px;
}

.preview-modal[data-device="mobile"] .preview-content {
    width: 390px;
    height: 844px;
}

.preview-modal[data-device="mobile"] .preview-container {
    width: 390px;
    height: 844px;
}


/* Preview Button Styles */

.preview-btn {
    background: #444;
    border: none;
    color: #fff;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.preview-btn:hover {
    background: #555;
}

.preview-btn i {
    font-size: 14px;
}


/* Device Icons */

.preview-header::before {
    content: '';
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.7;
}

.preview-modal[data-device="tablet"] .preview-header::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M19,18H5V6H19M21,4H3C1.89,4 1,4.89 1,6V18A2,2 0 0,0 3,20H21A2,2 0 0,0 23,18V6C23,4.89 22.1,4 21,4Z'/%3E%3C/svg%3E");
}

.preview-modal[data-device="mobile"] .preview-header::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M17,19H7V5H17M17,1H7C5.89,1 5,1.89 5,3V21A2,2 0 0,0 7,23H17A2,2 0 0,0 19,21V3C19,1.89 18.1,1 17,1Z'/%3E%3C/svg%3E");
}


/* Zoom Controls */

.zoom-tabs {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 10px 0;
    padding: 0 10px;
}

.zoom-tab {
    background: #444;
    border: none;
    color: #666;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex: 1;
}

.zoom-tab:hover {
    background: #555;
    color: #999;
}

.zoom-tab.active {
    background: #666;
    color: white;
}

.zoom-tab i {
    font-size: 16px;
}

.zoom-content {
    position: relative;
}

.zoom-pane {
    display: none;
    padding: 10px 0;
}

.zoom-pane.active {
    display: block;
}


/* Hide zoom controls on mobile and tablet */

@media (max-width: 1023px) {
    .zoom-tabs,
    .zoom-content {
        display: none;
    }
}

.zoom-content {
    display: none;
}


/* Playback Controls */

.playback-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    display: flex;
    gap: 10px;
}

.playback-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #333;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.playback-btn:hover {
    background: #444;
    transform: scale(1.05);
}

.playback-btn:active {
    transform: scale(0.95);
}

.play-btn {
    background: #4CAF50;
}

.play-btn:hover {
    background: #45a049;
}

.stop-btn {
    background: #f44336;
}

.stop-btn:hover {
    background: #e53935;
}

@media (max-width: 768px) {
    .playback-controls {
        bottom: 15px;
        right: 15px;
    }
    .playback-btn {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}


/* Video Settings Modal Styles */

#videoSettingsModal .modal-content {
    max-width: 450px;
    background: #2a2a2a;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
}

#videoSettingsModal .modal-header {
    background: #333;
    padding: 20px 25px;
    border-bottom: 1px solid #444;
    border-radius: 16px 16px 0 0;
}

#videoSettingsModal .modal-header h3 {
    font-size: 18px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

#videoSettingsModal .modal-header h3::before {
    content: '\f03d';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #4CAF50;
    font-size: 20px;
}

#videoSettingsModal .modal-body {
    padding: 25px;
}

.video-settings {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setting-item {
    background: #333;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #444;
    transition: all 0.3s ease;
}

.setting-item:hover {
    border-color: #555;
    background: #383838;
}

.setting-item label {
    font-size: 14px;
    color: #bbb;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-item label::before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #666;
}


/* Her ayar için özel ikonlar */

.setting-item:nth-child(1) label::before {
    content: '\f03e';
}


/* Kalite - resim ikonu */

.setting-item:nth-child(2) label::before {
    content: '\f3fd';
}


/* FPS - kare ikonu */

.setting-item:nth-child(3) label::before {
    content: '\f2f1';
}


/* Dönüş - döngü ikonu */

.setting-item:nth-child(4) label::before {
    content: '\f017';
}


/* Süre - saat ikonu */

.setting-item:nth-child(5) label::before {
    content: '\f362';
}


/* Yön - ok ikonu */

.setting-item:nth-child(6) label::before {
    content: '\f1c8';
}


/* Format - video ikonu */

.setting-item select,
.setting-item input[type="number"] {
    width: 100%;
    background: #222;
    border: 1px solid #444;
    color: #fff;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.setting-item select:hover,
.setting-item input[type="number"]:hover {
    border-color: #555;
}

.setting-item select:focus,
.setting-item input[type="number"]:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.setting-item input[type="number"] {
    -moz-appearance: textfield;
}

.setting-item input[type="number"]::-webkit-outer-spin-button,
.setting-item input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.modal-footer {
    margin-top: 25px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #444;
}

.modal-footer .action-btn {
    padding: 12px 24px;
    font-size: 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: auto;
    transition: all 0.3s ease;
}

.modal-footer .cancel-btn {
    background: #444;
    color: #fff;
}

.modal-footer .cancel-btn:hover {
    background: #555;
    transform: translateY(-1px);
}

.modal-footer .create-video-btn {
    background: #4CAF50;
    color: #fff;
}

.modal-footer .create-video-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.modal-footer .create-video-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
}


/* Loading state */

.create-video-btn.loading {
    position: relative;
    pointer-events: none;
}

.create-video-btn.loading i {
    animation: spin 1s linear infinite;
}

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


/* Mobil için düzenlemeler */

@media (max-width: 768px) {
    #videoSettingsModal .modal-content {
        margin: 15px;
        width: calc(100% - 30px);
    }
    #videoSettingsModal .modal-header {
        padding: 15px 20px;
    }
    #videoSettingsModal .modal-body {
        padding: 20px;
    }
    .setting-item {
        padding: 12px;
    }
    .modal-footer {
        flex-direction: column;
    }
    .modal-footer .action-btn {
        width: 100%;
        justify-content: center;
    }
}


/* Video hız kontrolü için stiller */

.setting-item .speed-value {
    display: inline-block;
    min-width: 60px;
    text-align: right;
    margin-left: 10px;
    color: #bbb;
    font-size: 13px;
}

#videoSpeed {
    width: calc(100% - 70px);
    margin: 10px 0;
}


/* Loading Modal Styles */

.loading-content {
    max-width: 400px !important;
    text-align: center;
    padding: 20px !important;
}

.loading-header {
    margin-bottom: 20px;
}

.loading-header h3 {
    margin: 0;
    color: #333;
}

.progress-container {
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 0.3s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
}

.frame-info {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

.loading-content .modal-close {
    display: none;
}