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

body {
    font-family: 'Segoe UI', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    overflow: hidden;
}

/* Landing Page */
.landing-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.landing-container::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero {
    text-align: center;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

.hero h1 {
    font-size: 4rem;
    color: white;
    margin-bottom: 20px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 30px;
}

.btn-entrar {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.btn-entrar:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.features {
    display: flex;
    gap: 40px;
    margin-top: 80px;
    z-index: 1;
    animation: fadeInUp 1s ease 0.3s both;
}

.feature-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s;
    width: 250px;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: white;
    margin-bottom: 10px;
}

.feature-card p {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

/* Player App Styles */
.player-app {
    display: flex;
    height: 100vh;
    background: #0a0a0a;
}

/* Sidebar */
.sidebar {
    width: 350px;
    background: linear-gradient(180deg, #0f0f1a 0%, #1a1a2e 100%);
    border-right: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.logo {
    padding: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h2 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.3rem;
}

.badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    animation: pulse 2s infinite;
}

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

.playlist-header {
    padding: 20px 25px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.playlist-header h3 {
    color: white;
    font-size: 1.1rem;
}

.playlist-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 1rem;
}

.icon-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

.playlist-search {
    padding: 10px 25px;
}

.playlist-search input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.playlist-search input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255,255,255,0.15);
}

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

.playlist-stats {
    padding: 10px 25px;
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
}

.playlist-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px 25px 25px;
}

.playlist-container::-webkit-scrollbar {
    width: 5px;
}

.playlist-container::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.playlist-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

#playlist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#playlist li {
    background: rgba(255,255,255,0.05);
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    animation: slideIn 0.3s ease;
}

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

#playlist li:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
    border-color: rgba(102,126,234,0.3);
}

#playlist li.active {
    background: linear-gradient(135deg, rgba(102,126,234,0.2), rgba(118,75,162,0.2));
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102,126,234,0.3);
}

.video-thumb {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.video-info {
    flex: 1;
}

.video-title {
    color: white;
    font-weight: 500;
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.video-duration {
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: radial-gradient(circle at center, #1a1a2e 0%, #0a0a0a 100%);
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 1280px;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.1);
}

.custom-video {
    width: 100%;
    height: auto;
    display: block;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 10;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #667eea;
    border-right-color: #764ba2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    color: white;
    font-size: 1rem;
}

.loading-tip {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    font-style: italic;
}

/* Video Controls - Design Ultra Moderno */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.8) 50%, transparent 100%);
    padding: 20px 25px 25px;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 20;
}

.video-wrapper:hover .video-controls {
    opacity: 1;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 18px;
}

.progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: visible;
    transition: height 0.2s;
}

.progress-bar:hover {
    height: 8px;
}

.progress-bar:hover .progress-hover {
    opacity: 1;
}

.progress-buffer {
    position: absolute;
    height: 100%;
    background: rgba(255,255,255,0.25);
    width: 0%;
    border-radius: 3px;
}

.progress-filled {
    position: absolute;
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 3px;
    position: relative;
}

.progress-filled::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 0 10px rgba(102,126,234,0.8);
}

.progress-bar:hover .progress-filled::after {
    opacity: 1;
}

.progress-hover {
    position: absolute;
    height: 100%;
    background: rgba(255,255,255,0.1);
    width: 0%;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.time-display {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 8px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    font-family: 'Monaco', 'Monospace';
    letter-spacing: 0.5px;
}

/* Controls Row */
.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.controls-left, .controls-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Botões Ultra Modernos */
.control-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    cursor: pointer;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    backdrop-filter: blur(5px);
}

.control-btn:hover {
    background: rgba(102,126,234,0.8);
    transform: scale(1.08);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

.control-btn:active {
    transform: scale(0.95);
}

.play-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    width: 48px;
    height: 48px;
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102,126,234,0.6);
}

/* Volume Container */
.volume-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.volume-slider-container {
    width: 0;
    overflow: hidden;
    transition: width 0.3s ease;
}

.volume-container:hover .volume-slider-container {
    width: 90px;
}

.volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(102,126,234,0.5);
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Speed Control */
.speed-container {
    position: relative;
}

.speed-btn {
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.speed-menu {
    position: absolute;
    bottom: 50px;
    left: 0;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 8px;
    min-width: 100px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 30;
}

.speed-container:hover .speed-menu {
    opacity: 1;
    visibility: visible;
}

.speed-menu-item {
    padding: 8px 15px;
    color: white;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.85rem;
    text-align: center;
}

.speed-menu-item:hover {
    background: rgba(102,126,234,0.6);
}

.speed-menu-item.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

/* Video Info Overlay */
.video-info-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, rgba(0,0,0,0.8), rgba(0,0,0,0.6));
    padding: 15px 20px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 15;
    border-left: 3px solid #667eea;
}

.video-wrapper:hover .video-info-overlay {
    opacity: 1;
}

.video-info-content h2 {
    color: white;
    font-size: 1rem;
    margin-bottom: 5px;
}

.video-info-content p {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

.video-stats {
    margin-top: 8px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.hack-tag {
    background: rgba(255,107,107,0.3);
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    color: #ff6b6b;
}

.video-id {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    font-family: monospace;
}

/* Error Message */
.error-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,0,0,0.9);
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    display: none;
    z-index: 30;
    min-width: 320px;
    backdrop-filter: blur(10px);
}

.error-message.active {
    display: block;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translate(-50%, -50%); }
    25% { transform: translate(-52%, -50%); }
    75% { transform: translate(-48%, -50%); }
}

.error-message span {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.error-message p {
    color: white;
    font-size: 0.9rem;
}

/* Modal Melhorado */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 24px;
    min-width: 350px;
    overflow: hidden;
    animation: zoomIn 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-header h3 {
    color: white;
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255,255,255,0.1);
}

.quality-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 24px;
}

.quality-option {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quality-option:hover {
    background: rgba(102,126,234,0.3);
    border-color: #667eea;
    transform: translateX(5px);
}

.modal-note {
    display: block;
    padding: 0 24px 20px;
    color: rgba(255,255,255,0.4);
    font-size: 0.7rem;
    text-align: center;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    transition: transform 0.3s;
    border: 1px solid rgba(102,126,234,0.5);
}

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

.toast-icon {
    font-size: 1.2rem;
}

.toast-message {
    color: white;
    font-size: 0.9rem;
}

/* Shortcuts Hint */
.shortcuts-hint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    padding: 12px 18px;
    border-radius: 16px;
    display: flex;
    gap: 15px;
    z-index: 100;
    font-size: 0.7rem;
    border: 1px solid rgba(255,255,255,0.1);
    opacity: 0;
    transition: opacity 0.3s;
}

.shortcuts-hint:hover {
    opacity: 1 !important;
}

.video-wrapper:hover ~ .shortcuts-hint {
    opacity: 0.5;
}

.shortcut {
    display: flex;
    align-items: center;
    gap: 8px;
}

kbd {
    background: rgba(255,255,255,0.15);
    padding: 4px 8px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.7rem;
    color: #667eea;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        position: fixed;
        left: -280px;
        z-index: 200;
        transition: left 0.3s;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .controls-left, .controls-right {
        gap: 8px;
    }
    
    .control-btn {
        width: 36px;
        height: 36px;
    }
    
    .play-btn {
        width: 42px;
        height: 42px;
    }
    
    .volume-container {
        display: none;
    }
    
    .features {
        flex-direction: column;
        gap: 20px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .shortcuts-hint {
        display: none;
    }
}

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