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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #e0e0e0;
    min-height: 100vh;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    background: rgba(15, 32, 39, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-bottom: 2px solid #00b4d8;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo i {
    font-size: 2rem;
    color: #00b4d8;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.logo h1 span {
    color: #00b4d8;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    gap: 0.5rem;
    max-width: 300px;
}

.search-bar i {
    color: #00b4d8;
}

.search-bar input {
    background: none;
    border: none;
    color: white;
    outline: none;
    width: 100%;
    font-size: 0.9rem;
}

.search-bar input::placeholder {
    color: #90e0ef;
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    gap: 1rem;
    padding: 1rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* Panels */
.panel {
    background: rgba(25, 50, 60, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    width: 300px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 180, 216, 0.3);
    transition: all 0.3s;
    max-height: calc(100vh - 150px);
}

.panel.collapsed {
    min-width: 60px;
    width: 60px;
}

.panel.collapsed .panel-content,
.panel.collapsed .panel-header h2 {
    display: none;
}

.panel-header {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(0, 180, 216, 0.3);
}

.panel-header i {
    font-size: 1.3rem;
    color: #00b4d8;
}

.panel-header h2 {
    font-size: 1.1rem;
    flex: 1;
}

.btn-refresh, .btn-collapse {
    background: rgba(0, 180, 216, 0.2);
    border: none;
    color: #90e0ef;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-refresh:hover, .btn-collapse:hover {
    background: rgba(0, 180, 216, 0.4);
    transform: scale(1.05);
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

/* Stream Cards */
.stream-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid #00b4d8;
}

.stream-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card-header {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.stream-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #00b4d8, #0077b6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.stream-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stream-logo i {
    font-size: 1.2rem;
    color: white;
}

.stream-info {
    flex: 1;
    min-width: 0;
}

.stream-title {
    color: #2c3e50;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stream-genre {
    display: inline-block;
    background: #ecf0f1;
    color: #7f8c8d;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
}

.stream-description {
    color: #555;
    font-size: 0.75rem;
    margin: 0.5rem 0;
    display: -webkit-box;
    /* -webkit-line-clamp: 2; */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stream-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.stream-country, .stream-group {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: #3498db;
    color: white;
}

.stream-group {
    background: #9b59b6;
}

.play-btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, #00b4d8, #0077b6);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.play-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* Player Section */
.player-section {
    flex: 1;
    min-width: 300px;
}

.player-card {
    background: rgba(25, 50, 60, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 180, 216, 0.3);
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.player-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.now-playing {
    background: rgba(0, 180, 216, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

.video-wrapper {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
    margin-bottom: 1rem;
}

#videoPlayer {
    width: 100%;
    height: 100%;
    display: none;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a1929, #1a3a5f);
    color: #90e0ef;
}

.video-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.player-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.player-controls button {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #0077b6, #0096c7);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.player-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.player-controls button:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #0f2027 0%, #1a3a3f 100%);
    border-top: 1px solid rgba(0, 180, 216, 0.3);
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand {
    flex: 1;
    min-width: 200px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.footer-logo i {
    font-size: 1.3rem;
    color: #00b4d8;
}

.footer-logo span {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
}

.footer-logo span span {
    color: #00b4d8;
}

.footer-description {
    font-size: 0.8rem;
    color: #90e0ef;
    opacity: 0.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-column {
    min-width: 130px;
}

.footer-column h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #00b4d8;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 0.4rem;
}

.footer-column a {
    color: #b0e0ef;
    text-decoration: none;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-column a:hover {
    color: #00b4d8;
    transform: translateX(3px);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem 1.5rem;
    text-align: center;
    border-top: 1px solid rgba(0, 180, 216, 0.2);
}

.footer-bottom p {
    font-size: 0.7rem;
    color: #90e0ef;
    opacity: 0.7;
    margin: 0;
}

.footer-bottom strong {
    color: #00b4d8;
}

/* Responsive Footer - Siempre horizontal */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
    
    .footer-brand {
        flex: 100%;
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-links {
        justify-content: center;
        width: 100%;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-column h4 {
        justify-content: center;
    }
    
    .footer-column a {
        justify-content: center;
    }
}

/* Loading & Empty States */
.loading, .empty-state {
    text-align: center;
    padding: 2rem;
    color: #90e0ef;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.error-message {
    text-align: center;
    padding: 1rem;
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 8px;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #00b4d8, #0077b6);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #00b4d8;
    border-radius: 10px;
}

/* Responsive Main Layout */
@media (max-width: 900px) {
    .main-content {
        flex-direction: column;
    }
    
    .panel {
        width: 100%;
        max-height: 350px;
    }
    
    .panel.collapsed {
        max-height: 60px;
    }
    
    .player-section {
        order: -1;
    }
}

@media (max-width: 600px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .search-bar {
        max-width: 100%;
    }
    
    .player-controls {
        flex-direction: column;
    }
    
    .logo h1 {
        font-size: 1.4rem;
    }
}

/* Boton flotante Volver arriba */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00b4d8, #0077b6);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, #0096c7, #005f8a);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}