:root {
    --bg-color: #05080f;
    --panel-bg: rgba(18, 22, 31, 0.85);
    --text-main: #e6edf3;
    --text-muted: #8b949e;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    position: relative;
    overflow-x: hidden;
}

/* --- BACKGROUND ANIMATION --- */
body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
}

.bg-orb-1 {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
    top: -100px;
    left: -100px;
    z-index: -1;
    animation: float 12s infinite alternate ease-in-out;
    border-radius: 50%;
    filter: blur(80px);
}

.bg-orb-2 {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, transparent 60%);
    bottom: -100px;
    right: -100px;
    z-index: -1;
    animation: float 15s infinite alternate-reverse ease-in-out;
    border-radius: 50%;
    filter: blur(80px);
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.2); }
}

/* --- HEADER --- */
header {
    text-align: center;
    margin-bottom: 30px;
    z-index: 1;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* --- MAIN LAYOUT --- */
main {
    width: 100%;
    max-width: 1000px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.video-wrapper {
    width: 100%;
    position: relative;
}

/* --- VIDEO PLAYER --- */
#video-container {
    width: 100%;
    background: #000;
    border-radius: 16px 16px 0 0; /* Flat ang ilawom para motapot sa controls */
    overflow: hidden;
    aspect-ratio: 16 / 9;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border);
    border-bottom: none;
}

#video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    outline: none;
}

/* --- PREMIUM CONTROL BAR --- */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 15px 20px;
    border-radius: 0 0 16px 16px; /* Flat ang ibabaw para motapot sa video */
    border: 1px solid var(--border);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    flex-wrap: wrap;
}

.dropdown-group {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 300px;
}

.button-group {
    display: flex;
    gap: 10px;
}

/* --- DROPDOWNS --- */
#source-select, 
#channel-select {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background-color: rgba(0, 0, 0, 0.4);
    color: var(--text-main);
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%238b949e%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 14px top 50%;
    background-size: 10px auto;
}

#source-select {
    flex: 0.4;
}

#source-select:hover, 
#channel-select:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background-color: rgba(0, 0, 0, 0.6);
}

#source-select:focus, 
#channel-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* --- BUTTONS --- */
button {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#play-btn {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

#play-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

#stop-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#stop-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* --- STATUS BAR --- */
.status-wrapper {
    margin-top: 20px;
    text-align: center;
    width: 100%;
}

#status {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 30px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: color 0.3s ease;
    backdrop-filter: blur(10px);
}

footer {
    margin-top: auto;
    padding-top: 40px;
    font-size: 0.8rem;
    color: #484f58;
    text-align: center;
    z-index: 1;
}

/* --- RESPONSIVE PARA SA MOBILE --- */
@media (max-width: 768px) {
    .controls {
        flex-direction: column;
        border-radius: 0 0 16px 16px;
    }
    .dropdown-group, 
    .button-group {
        width: 100%;
        flex-direction: column;
    }
    #source-select, 
    #channel-select,
    button {
        width: 100%;
        flex: none;
    }
    header h1 {
        font-size: 2rem;
    }
}
