:root {
    --bg-color: #050608;
    --primary: #00f2ff;
    --primary-glow: rgba(0, 242, 255, 0.4);
    --secondary: #7000ff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --accent-red: #ff3e3e;
    --accent-green: #3eff81;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

/* Dynamic Background */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(80px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
    transition: all 4s ease;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -10%;
    right: -10%;
    animation: move1 20s infinite alternate;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -15%;
    left: -10%;
    animation: move2 25s infinite alternate;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #ff00ea;
    top: 40%;
    left: 40%;
    opacity: 0.2;
}

@keyframes move1 {
    from { transform: translate(0, 0); }
    to { transform: translate(-100px, 200px); }
}

@keyframes move2 {
    from { transform: translate(0, 0); }
    to { transform: translate(200px, -100px); }
}

/* Glass Container */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    width: 90%;
    max-width: 900px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

h1 {
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: -1px;
}

h1 span {
    color: var(--primary);
    font-size: 1rem;
    vertical-align: top;
    opacity: 0.8;
}

.subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 4px;
    font-weight: 600;
}

/* Status Indicator */
.status-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid var(--glass-border);
}

.status-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: block;
}

.online .status-led {
    background: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse 2s infinite;
}

.offline .status-led {
    background: var(--accent-red);
}

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

/* Player Section */
.player-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.now-playing h2 {
    font-size: 1.5rem;
    margin-top: 15px;
}

.now-playing p {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0.7;
}

.visualizer-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 30px;
    justify-content: center;
}

.visualizer-bars span {
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.playing .visualizer-bars span {
    animation: bounce 0.5s ease-in-out infinite alternate;
}

.playing .visualizer-bars span:nth-child(2) { animation-delay: 0.1s; }
.playing .visualizer-bars span:nth-child(3) { animation-delay: 0.2s; }
.playing .visualizer-bars span:nth-child(4) { animation-delay: 0.15s; }
.playing .visualizer-bars span:nth-child(5) { animation-delay: 0.05s; }

@keyframes bounce {
    from { height: 5px; }
    to { height: 30px; }
}

/* Controls */
.controls-wrapper {
    width: 100%;
    margin-top: 30px;
}

.main-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.play-btn {
    width: 64px;
    height: 64px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: var(--bg-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 20px var(--primary-glow);
}

.play-btn:hover {
    transform: scale(1.05);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 100px;
}

input[type="range"] {
    accent-color: var(--primary);
    cursor: pointer;
}

/* Channels Grid */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.admin-actions {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-color);
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 0 20px var(--primary-glow);
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: scale(1.02);
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input, .form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: 8px;
    color: white;
    font-family: inherit;
}

.channel-card {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    text-align: left;
}

.delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-red);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.channel-card:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background: var(--accent-red);
    color: white;
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 2rem;
    cursor: pointer;
}

.hidden {
    display: none;
}

.url-preview {
    font-size: 0.65rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 6px;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--primary);
    border: 1px solid rgba(0, 242, 255, 0.2);
}

.copy-btn {
    background: var(--primary);
    color: var(--bg-color);
    border: none;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 800;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--accent-green);
}

.copy-btn:active {
    transform: scale(0.9);
}
