* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333333;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
    padding: 20px;
    gap: 20px;
}

.player-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.header {
    text-align: center;
    padding: 20px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.header i {
    font-size: 2em;
    color: #e74c3c;
}

.header h1 {
    font-size: 2em;
    color: #2c3e50;
    font-weight: 600;
}

.player-wrapper {
    flex: 1;
    background: #ffffff;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

#player {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16/9;
    border-radius: 10px;
}

.sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 350px;
}

.search-section {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: #3498db;
}

.search-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input[type="text"] {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
    color: #333333;
    font-size: 14px;
    transition: all 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.button-group {
    display: flex;
    gap: 10px;
}

button {
    flex: 1;
    padding: 12px 25px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

button:active {
    transform: translateY(0);
}

.results-section, .queue-section {
    flex: 1;
    background: #ffffff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.video-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    background: #f9f9f9;
}

.video-item:hover {
    background: #e3f2fd;
    border-color: #3498db;
    transform: translateX(5px);
}

.video-thumbnail {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #ddd;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.video-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    color: #2c3e50;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-actions {
    display: flex;
    gap: 6px;
}

.small-btn {
    padding: 6px 10px;
    font-size: 12px;
    background: #ffffff;
    border: 1px solid #3498db !important;
    color: #3498db;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.small-btn:hover {
    background: #3498db;
    color: #ffffff;
    transform: scale(1.05);
}

.remove-btn {
    border-color: #e74c3c !important;
    color: #e74c3c;
}

.remove-btn:hover {
    background: #e74c3c;
    color: white;
}

.queue-item {
    display: grid;
    grid-template-columns: 30px 1fr 50px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: #f9f9f9;
    border-left: 4px solid #3498db;
    transition: all 0.3s;
}

.queue-item:hover {
    background: #e3f2fd;
    transform: translateX(3px);
}

.queue-number {
    background: #3498db;
    color: #ffffff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.queue-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.queue-content .video-title {
    font-size: 12px;
    margin: 0;
}

.queue-remove {
    background: #ffffff;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 4px 8px;
    font-size: 11px;
    width: 100%;
}

.queue-remove:hover {
    background: #e74c3c;
    color: white;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

.empty-state {
    text-align: center;
    padding: 30px;
    color: #95a5a6;
    font-style: italic;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.empty-state i {
    font-size: 2em;
    color: #bdc3c7;
}

/* TOAST NOTIFICATIONS */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.removing {
    animation: slideOut 0.3s ease-out forwards;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    opacity: 0.8;
}

.toast.success .toast-icon {
    color: #27ae60;
}

.toast.success .toast-title {
    color: #27ae60;
}

.toast.error .toast-icon {
    color: #e74c3c;
}

.toast.error .toast-title {
    color: #e74c3c;
}

.toast.warning .toast-icon {
    color: #f39c12;
}

.toast.warning .toast-title {
    color: #f39c12;
}

.toast.info .toast-icon {
    color: #3498db;
}

.toast.info .toast-title {
    color: #3498db;
}

/* PLAYER CONTROLS */
.player-controls {
    display: flex;
    gap: 12px;
    background: #ffffff;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.control-btn {
    flex: 1;
    padding: 12px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.control-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.control-btn:active {
    transform: translateY(0);
}

.prev-btn {
    background: #95a5a6;
}

.prev-btn:hover {
    background: #7f8c8d;
}

.skip-btn {
    background: #27ae60;
}

.skip-btn:hover {
    background: #229954;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }
    .sidebar {
        min-width: unset;
    }
}