* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: background 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

#particlesCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.header, .nav-categories, .container, .music-player {
    position: relative;
    z-index: 10;
}

.header {
    padding: 16px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(10, 12, 21, 0.9);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
}

.logo p {
    font-size: 0.7rem;
    opacity: 0.8;
    color: #aaa;
}

.controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.theme-selector, .layout-selector {
    display: flex;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 12px;
}

.theme-btn, .layout-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.theme-btn:hover, .layout-btn:hover {
    transform: translateY(-2px);
    background: rgba(59, 130, 246, 0.4);
}

.theme-btn.active, .layout-btn.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.nav-categories {
    padding: 12px 24px;
    border-bottom: 1px solid #2d313e;
    overflow-x: auto;
}

.categories-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-link {
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: none;
}

.category-link:hover {
    transform: translateY(-2px);
    background: rgba(59, 130, 246, 0.3);
}

.category-link.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 10px;
}

.sites-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sites-list .site-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}

.sites-list .site-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.sites-list .site-actions {
    margin-top: 0;
}

.site-card {
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.site-card:hover {
    transform: translateY(-5px);
    border-color: #3b82f6;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.site-card.clicked {
    transform: scale(0.98);
}

.site-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.site-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: white;
}

.site-desc {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 10px;
    color: #aaa;
}

.site-url {
    font-size: 0.65rem;
    opacity: 0.5;
    word-break: break-all;
    margin-bottom: 12px;
    color: #888;
}

.site-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.edit-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1;
}

.edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.delete-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1;
}

.delete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.add-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* PLAYER - SEM BARRA DE ROLAGEM */
.music-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    background: rgba(10, 12, 21, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.music-player:hover {
    transform: scale(1.02);
    border-color: #3b82f6;
}

.music-player-header {
    padding: 12px 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 20px 20px 0 0;
    color: white;
}

.music-player-content {
    padding: 16px;
    display: none;
    overflow: hidden;
}

.music-player.open .music-player-content {
    display: block;
}

#youtubePlayer {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.playlist-controls {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.playlist-controls button {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.75rem;
}

.playlist-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

#volumeControl {
    flex: 1;
    height: 4px;
    border-radius: 5px;
    cursor: pointer;
    background: #3b82f6;
}

.search-youtube {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}

.search-youtube input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 30px;
    border: 1px solid #2d313e;
    background: #1e212a;
    color: white;
}

.search-youtube input:focus {
    outline: none;
    border-color: #3b82f6;
}

.search-youtube button {
    padding: 10px 18px;
    border-radius: 30px;
    border: none;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    cursor: pointer;
    font-weight: 600;
}

.search-youtube button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* PLAYLIST - SEM BARRA DE ROLAGEM */
.playlist {
    margin-top: 12px;
    overflow: hidden;
}

.playlist h4 {
    margin-bottom: 8px;
    color: #3b82f6;
}

.playlist ul {
    list-style: none;
    max-height: 130px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Scrollbar fina e discreta */
.playlist ul::-webkit-scrollbar {
    width: 3px;
}

.playlist ul::-webkit-scrollbar-track {
    background: transparent;
}

.playlist ul::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 10px;
}

.playlist li {
    padding: 8px 10px;
    margin: 4px 0;
    cursor: pointer;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.playlist li:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateX(5px);
}

.remove-btn {
    background: rgba(239, 68, 68, 0.2);
    border: none;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 20px;
    color: #ef4444;
}

.remove-btn:hover {
    background: #ef4444;
    color: white;
}

/* RESULTADOS DA BUSCA - SEM BARRA DE ROLAGEM */
.search-results {
    max-height: 150px;
    overflow-y: auto;
    margin: 10px 0;
}

.search-results::-webkit-scrollbar {
    width: 3px;
}

.search-results::-webkit-scrollbar-track {
    background: transparent;
}

.search-results::-webkit-scrollbar-thumb {
    background: #8b5cf6;
    border-radius: 10px;
}

.search-result-item {
    padding: 8px;
    margin: 4px 0;
    cursor: pointer;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.search-result-item:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateX(5px);
}

.search-result-item img {
    width: 40px;
    height: 30px;
    border-radius: 6px;
}

/* NOTIFICAÇÕES */
.notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

.notification {
    background: rgba(30, 33, 42, 0.95);
    backdrop-filter: blur(10px);
    border-left: 4px solid;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease forwards;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.notification-success { border-left-color: #10b981; }
.notification-error { border-left-color: #ef4444; }
.notification-info { border-left-color: #3b82f6; }
.notification-warning { border-left-color: #f59e0b; }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.live-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff0000;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #1a1d26;
    border-radius: 24px;
    padding: 28px;
    width: 90%;
    max-width: 500px;
    border: 1px solid #3b82f6;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #3b82f6;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #2d313e;
    background: #1e212a;
    color: white;
    outline: none;
}

.form-group input:focus, .form-group select:focus {
    border-color: #3b82f6;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    flex: 1;
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    flex: 1;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1d26;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 10px;
}

@media (max-width: 768px) {
    .music-player { width: 300px; }
    .sites-grid { grid-template-columns: 1fr; gap: 20px; }
    .container { padding: 20px 16px; }
    .category-link { padding: 6px 14px; font-size: 0.75rem; }
    .site-actions { flex-direction: column; }
    .notification-container { top: 70px; right: 10px; left: 10px; max-width: none; }
    .videos-grid { grid-template-columns: 1fr; }
}