.wsp-wrapper {
    background: #1e1e1e;
    padding: 15px;
    border-radius: 8px;
    color: #fff;
    margin-bottom: 30px;
    max-width: 100%;
}

.wsp-video-box {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    background: #000;
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 4px;
}

.wsp-iframe-placeholder {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

.wsp-sub-overlay {
    position: absolute;
    bottom: 10%;
    left: 5%;
    right: 5%;
    text-align: center;
    pointer-events: none;
    z-index: 20;
    font-size: 1.2em;
    line-height: 1.4;
    color: #ffeaa7;
    text-shadow: 2px 2px 2px #000, -1px -1px 0 #000, 1px -1px 0 #000;
    font-weight: 600;
}

/* === TOOLBAR STYLES === */
.wsp-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    background: #2d3436;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.wsp-toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wsp-toolbar-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.wsp-toolbar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.wsp-toolbar-btn:active {
    transform: translateY(0);
}

.wsp-toolbar-btn.step-1 {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.4);
}

.wsp-toolbar-btn.step-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.4);
    animation: pulse 1s infinite;
}

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

.wsp-toolbar-btn.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.4);
}

.wsp-time-display {
    color: #a4b0bd;
    font-size: 13px;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
    font-family: 'Courier New', monospace;
}

.wsp-range-badge {
    background: rgba(255, 234, 167, 0.15);
    color: #ffeaa7;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* === SCRIPT MODAL === */
.wsp-script-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.wsp-script-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.wsp-script-modal-content {
    background: #2d3436;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

.wsp-script-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid #555;
}

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

.wsp-script-close-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 18px;
    transition: all 0.2s;
}

.wsp-script-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.wsp-script-modal-body {
    padding: 20px;
    overflow-y: auto;
    color: #fff;
    font-size: 14px;
    line-height: 1.8;
    flex: 1;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
}

.wsp-script-modal-body b {
    color: #fff;
    font-weight: 700;
}

.wsp-script-modal-body i {
    font-style: italic;
}

.wsp-script-modal-body u {
    text-decoration: underline;
}

.wsp-script-modal-body br {
    display: block;
    content: "";
}

/* === CONTROLS STYLES === */
.wsp-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 15px;
}

.wsp-nav-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.wsp-nav-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.wsp-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* === SERVER LABEL & GRID === */
.wsp-server-label {
    color: #ff7675;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9em;
    border-left: 3px solid #ff7675;
    padding-left: 8px;
}

.wsp-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.wsp-list-grid::-webkit-scrollbar { width: 6px; }
.wsp-list-grid::-webkit-scrollbar-thumb { background: #636e72; border-radius: 3px; }

.wsp-ep-btn {
    background: #353b48;
    color: #b2bec3;
    border: none;
    padding: 10px 5px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.wsp-ep-btn:hover {
    background: #555;
    color: #fff;
    transform: scale(1.05);
}

.wsp-ep-btn.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-weight: bold;
    box-shadow: 0 0 8px rgba(245, 87, 108, 0.6);
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .wsp-toolbar {
        padding: 10px;
        gap: 8px;
    }

    .wsp-toolbar-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .wsp-time-display {
        font-size: 12px;
        min-width: 70px;
    }

    .wsp-list-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }

    .wsp-ep-btn {
        padding: 8px 3px;
        font-size: 12px;
    }

    .wsp-script-modal-content {
        width: 95%;
        max-height: 80vh;
    }
}

@media (max-width: 480px) {
    .wsp-wrapper {
        padding: 10px;
    }

    .wsp-toolbar {
        flex-direction: column;
        gap: 8px;
    }

    .wsp-toolbar-group {
        width: 100%;
        justify-content: center;
    }

    .wsp-toolbar-btn {
        flex: 1;
        min-width: 60px;
        padding: 8px 6px;
        font-size: 11px;
    }

    .wsp-time-display {
        width: 100%;
        font-size: 11px;
    }

    .wsp-list-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    }

    .wsp-ep-btn {
        padding: 6px 2px;
        font-size: 11px;
    }

    .wsp-nav-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .wsp-script-modal-content {
        width: 98%;
        max-height: 90vh;
    }

    .wsp-script-modal-body {
        padding: 12px;
        font-size: 13px;
    }
}