.studio-shell {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 16px;
    padding-top: 80px;
}

.studio-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}
.studio-title h1 {
    font-size: 26px;
    margin: 6px 0 4px;
    color: #fff;
}
.studio-meta {
    display: flex;
    gap: 12px;
    color: #9da7be;
    font-size: 14px;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.studio-badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 12px;
    background: #1f2a44;
    color: #9dd0ff;
    font-weight: 600;
    font-size: 12px;
}
.studio-actions {
    display: flex;
    gap: 10px;
}
.pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #2e3c5c;
    background: transparent;
    color: #dbe7ff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.pill-btn.solid {
    background: #7c4dff;
    border-color: #7c4dff;
    color: #fff;
}
.pill-btn.ghost:hover {
    background: #1b2440;
}
.studio-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.wave-panel {
    position: relative;
    width: 100%;
    background: #0d1324;
    border: 1px solid #1c2540;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}
.wave-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.control-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ctrl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #27304b;
    background: #111a30;
    color: #dbe7ff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.ctrl-btn.primary {
    background: #1e88e5;
    border-color: #1e88e5;
}
.ctrl-btn.accent {
    background: #f06292;
    border-color: #f06292;
    color: #fff;
}
.ctrl-btn:active, .pill-btn:active {
    transform: scale(0.95);
}
.slider-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #cfd6ea;
    font-size: 14px;
    align-items: center;
}
.slider-row input[type=range] {
    accent-color: #7c4dff;
    cursor: pointer;
}

/* Waveform Wrapper: Zoom burayı etkiler */
#waveform-container {
    position: relative;
    width: 100%;
    height: 240px;
    background: #0b1220;
    border-radius: 12px;
    overflow-x: auto; /* Yatay scroll burada olacak */
    overflow-y: hidden;
}

/* Waveform'un kendisi */
#waveform {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Playhead */
#custom-playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background-color: #ff5252;
    z-index: 999; /* En üstte */
    pointer-events: none; /* Tıklama eventleri içinden geçsin, handle yakalasın */
}

/* Playhead Tutamak (Şapka) */
#custom-playhead-handle {
    position: absolute;
    top: -15px; /* Waveform'un üstüne taşır */
    left: 50%;
    transform: translateX(-50%);
    width: 0; 
    height: 0; 
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 16px solid #ff5252;
    cursor: ew-resize; /* Sağa sola ok */
    pointer-events: auto; /* Sadece buna tıklanabilsin */
    z-index: 1000;
}

#custom-playhead-handle:hover {
    transform: translateX(-50%) scale(1.1);
}

#wave-timeline {
    margin-bottom: 5px;
}
#wave-minimap {
    height: 50px;
    width: 100%;
    margin-top: 10px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
    position: relative;
    border-radius: 4px;
}
.overlay-time {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #00ffcc;
    padding: 5px 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
    z-index: 15;
    pointer-events: none;
    border: 1px solid rgba(0, 255, 204, 0.3);
}
.loader-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(11, 18, 32, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    flex-direction: column;
    gap: 10px;
}
.loader-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.wavesurfer-region-handle {
    cursor: col-resize !important;
    width: 10px !important;
    background-color: rgba(255, 255, 255, 0.6) !important;
    z-index: 900;
}
.studio-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}
.panel-section {
    background: #0d1324;
    border: 1px solid #1c2540;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}
.section-head {
    font-weight: 700;
    color: #dbe7ff;
    margin-bottom: 12px;
    border-bottom: 1px solid #1c2540;
    padding-bottom: 8px;
}
.export-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}
.export-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #27304b;
    background: #111a30;
    color: #dbe7ff;
    font-weight: 700;
    cursor: pointer;
}
.export-btn.primary {
    background: #7c4dff;
    border-color: #7c4dff;
    color: #fff;
}
.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    color: #cfd6ea;
    font-size: 14px;
}
.field-group input, .field-group select {
    background: #0b1220;
    border: 1px solid #1f2a44;
    border-radius: 10px;
    color: #e5ecff;
    padding: 10px;
    font-size: 14px;
}
.progress-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.progress-label {
    color: #9fb2d7;
    font-size: 13px;
}
.progress-track {
    width: 100%;
    height: 8px;
    background: #121a2f;
    border-radius: 20px;
    overflow: hidden;
}
.progress-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg,#7c4dff,#4fc3f7);
}
.export-log {
    min-height: 28px;
    color: #e5ecff;
    font-size: 13px;
    font-weight: 600;
    margin-top: auto;
}
.field-inline {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #cfd6ea;
    font-size: 14px;
    margin-bottom: 8px;
}
.inline-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.mini-btn {
    background: #1b243d;
    border: 1px solid #263256;
    color: #dbe7ff;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.mini-btn.danger {
    background: #2b1a1f;
    border-color: #f06292;
    color: #f9c0d0;
}
.ghost {
    background: transparent;
    border: 1px solid #2e3c5c;
    color: #dbe7ff;
    cursor: pointer;
}
.ghost.wide {
    width: 100%;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
}
.switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.switch input {
    display: none;
}
.switch .slider {
    width: 42px;
    height: 22px;
    background: #1b243d;
    border-radius: 12px;
    position: relative;
    transition: .2s;
}
.switch .slider::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 2px;
    background: #7c4dff;
    border-radius: 50%;
    transition: .2s;
}
.switch input:checked + .slider {
    background: #2f3c5d;
}
.switch input:checked + .slider::after {
    transform: translateX(18px);
}
.switch-label {
    color: #cfd6ea;
    font-size: 14px;
}
.region-list {
    max-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.region-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 6px;
    align-items: center;
    background: #0f172a;
    border: 1px solid #1f2a44;
    border-radius: 8px;
    padding: 6px;
}
.region-row input {
    width: 100%;
    background: #0b1220;
    border: 1px solid #1f2a44;
    border-radius: 6px;
    color: #e5ecff;
    padding: 4px;
    font-size: 12px;
}
.region-label {
    color: #a4b5d5;
    font-weight: 600;
    font-size: 12px;
}
/* Kesim Alanları Paneli - Waveform Altında */
.full-width-panel {
    grid-column: span 3;
}

/* ------------------- */
/* --- Mobil Stiller --- */
/* ------------------- */

/* Tablet ve Altı */
@media (max-width: 1000px) {
    .studio-bottom {
        grid-template-columns: 1fr;
    }
    .full-width-panel {
        grid-column: span 1;
    }
}

/* Mobil Cihazlar */
@media (max-width: 768px) {
    .studio-shell {
        padding: 10px;
        padding-top: 78px;
        gap: 16px;
    }
    .studio-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .studio-title h1 {
        font-size: 22px;
    }
    .studio-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .pill-btn {
        justify-content: center;
        padding: 12px;
    }
    .wave-panel {
        padding: 12px;
    }
    .wave-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .slider-row {
        flex-direction: column;
        align-items: stretch;
    }
    .slider-row input[type="range"] {
        width: 100%;
    }
    #waveform-container {
        height: 180px;
    }
    .export-grid {
        grid-template-columns: 1fr;
    }
    .region-list {
        max-height: 200px;
    }
    .region-row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }
    .region-label {
        font-size: 13px;
        grid-column: 1 / -1;
    }
    .region-row .mini-btn {
        width: auto;
        justify-self: start;
        padding: 8px 12px;
    }
    .overlay-time {
        font-size: 14px;
        padding: 4px 8px;
    }
}