/* Audio Guard - Player CSS */

.ag-library {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 800px;
}

/* ---- Ürün Kartı ---- */
.ag-product-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.ag-product-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
}

.ag-cover {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.ag-product-info {
    flex: 1;
    min-width: 0;
}

.ag-product-title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 600;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ag-file-count {
    font-size: 13px;
    color: #6b7280;
}

/* ---- Player Alanı ---- */
.ag-player-area {
    padding: 0;
}

/* ---- Tek Track ---- */
.ag-track {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background .15s;
}

.ag-track:last-child {
    border-bottom: none;
}

.ag-track:hover {
    background: #fafafa;
}

/* ---- Track Header ---- */
.ag-track-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.ag-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s, transform .1s;
}

.ag-play-btn:hover  { background: #1d4ed8; }
.ag-play-btn:active { transform: scale(.95); }

.ag-track-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ag-track-time {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
}

/* ---- İlerleme Çubuğu ---- */
.ag-progress-bar {
    position: relative;
    height: 20px;
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.ag-progress-fill {
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: #2563eb;
    border-radius: 2px;
    pointer-events: none;
    transition: width .1s linear;
    z-index: 1;
}

.ag-seek {
    position: absolute;
    left: 0; right: 0;
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: #e5e7eb;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    z-index: 2;
}

.ag-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    box-shadow: 0 0 0 2px #fff;
}

.ag-seek::-moz-range-thumb {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    border: 2px solid #fff;
}

/* ---- Alt Kontroller ---- */
.ag-controls-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.ag-speed-btn,
.ag-rwd-btn,
.ag-fwd-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
    transition: background .1s;
    white-space: nowrap;
}

.ag-speed-btn:hover,
.ag-rwd-btn:hover,
.ag-fwd-btn:hover {
    background: #e5e7eb;
}

.ag-volume {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.ag-vol-range {
    width: 72px;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.ag-vol-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #6b7280;
    cursor: pointer;
}

/* ---- Durum mesajı ---- */
.ag-status {
    font-size: 12px;
    color: #6b7280;
    padding: 4px 0;
    animation: ag-pulse 1.2s ease-in-out infinite;
}

@keyframes ag-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .4; }
}

.ag-empty {
    color: #6b7280;
    font-style: italic;
    padding: 12px 0;
}

/* ---- Mobil ---- */
@media (max-width: 480px) {
    .ag-product-header { flex-wrap: wrap; }
    .ag-track { padding: 12px 14px; }
    .ag-track-header { gap: 8px; }
    .ag-volume { display: none; } /* Mobilde ses kolu gizle, sistem sesi yeterli */
    .ag-controls-bottom { gap: 6px; }
    .ag-product-title { font-size: 15px; }
}

/* ---- Koruma Uyarı Toast'ı ---- */
.ag-protect-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1f2937;
    color: #fff;
    padding: 12px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    opacity: 0;
    z-index: 9999;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ag-protect-toast::before {
    content: "🔒";
    font-size: 15px;
}

.ag-protect-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 480px) {
    .ag-protect-toast {
        left: 16px;
        right: 16px;
        transform: translateY(20px);
        text-align: center;
        justify-content: center;
    }
    .ag-protect-toast.show {
        transform: translateY(0);
    }
}
