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

body {
    background: #0a0a0a;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    color: #ffffff;
}

.player-widget {
    background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    border-radius: 20px;
    padding: 25px;
    margin: 20px auto;
    max-width: 900px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 8px 25px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

.player-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(30, 144, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 20, 147, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.widget-content {
    position: relative;
    z-index: 2;
}

.widget-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.widget-title {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.widget-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-top: 8px;
    font-weight: 400;
}

.search-section {
    margin-bottom: 25px;
}

.search-container {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 16px 55px 16px 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(0, 0, 0, 0.6);
    box-shadow:
        0 0 0 4px rgba(102, 126, 234, 0.2),
        0 8px 32px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-btn {
position: absolute;
right: 8px;
top: 50%;
transform: translateY(-50%);
background: transparent;
border: none;
color: white;
padding: 12px;
font-size: 16px;
cursor: pointer;
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.05);
}

.search-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.search-results {
    max-height: 350px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 15px;
    margin-bottom: 20px;
    display: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 3px;
}

.search-result-item {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.search-result-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(8px);
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-poster {
    width: 50px;
    height: 75px;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.result-info {
    flex: 1;
}

.result-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 6px;
    line-height: 1.3;
}

.result-meta {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-type {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-type.movie {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.loading-spinner {
    display: none;
    text-align: center;
    padding: 30px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

.loading-spinner i {
    font-size: 24px;
    margin-bottom: 10px;
    animation: spin 1s linear infinite;
}

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

.selected-content {
    display: none;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.selected-content.show {
    display: block;
    animation: slideIn 0.3s ease-out;
}

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

.selected-title {
    color: #667eea;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.selected-meta {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.season-episode-controls {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.season-episode-controls.show {
    display: grid;
    animation: slideIn 0.3s ease-out;
}

.input-group {
    margin-bottom: 0;
}

.input-label {
color: #ccc;
font-size: 13px;
font-weight: 500;
margin-bottom: 6px;
gap: 6px;
}

.dropdown-select {
width: 100%;
padding: 12px 16px;
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 10px;
color: #fff;
font-size: 14px;
font-weight: 500;
backdrop-filter: blur(8px);
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg fill='white' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 12px center;
background-size: 16px 16px;
cursor: pointer;
}

.dropdown-select:focus {
outline: none;
border-color: #667eea;
background: rgba(255, 255, 255, 0.08);
}
.dropdown-select option {
    background: #1a1a1a;
    color: #ffffff;
    padding: 8px;
}

.quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    justify-content: center;
}

.quick-btn {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-btn:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.player-container {
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.player-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 18px;
}

.error-message {
    display: none;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(238, 90, 36, 0.2));
    border: 2px solid rgba(255, 107, 107, 0.4);
    color: #ff6b6b;
    padding: 16px;
    border-radius: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(10px);
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    margin: 25px 0;
}

@media (max-width: 768px) {
    .player-widget {
        padding: 20px;
        margin: 10px;
        border-radius: 15px;
    }

    .widget-title {
        font-size: 24px;
    }

    .season-episode-controls {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .quick-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        padding: 14px 50px 14px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .player-widget {
        padding: 15px;
        margin: 5px;
    }

    .widget-title {
        font-size: 20px;
    }

    .player-container {
        border-radius: 15px;
    }

    .search-results {
        max-height: 250px;
    }
}

.widget-content {
    animation: fadeInUp 0.6s ease-out;
}

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

.search-input.loading {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}
