:root {
    --yt-bg: #0f0f0f;
    --yt-bg-secondary: #0f0f0f;
    --yt-header-bg: #0f0f0f;
    /* Usually same as bg or slightly lighter */
    --yt-text: #f1f1f1;
    --yt-text-sec: #aaaaaa;
    --yt-red: #cc0000;
    /* Use standard red */
    --yt-red-hover: #d90909;
    /* Slightly brighter */
    --yt-spec-button-bg: #f1f1f1;
    --yt-spec-button-text: #0f0f0f;
    --yt-search-bg: #121212;
    --yt-search-border: #303030;
    --yt-panel-bg: #272727;
    /* Description box bg */
    --yt-border: #3f3f3f;
}

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

body {
    background-color: var(--yt-bg);
    color: var(--yt-text);
    font-family: 'Roboto', "Arial", sans-serif;
    font-size: 14px;
    overflow-x: hidden;
}

/* Header */
.yt-header {
    height: 56px;
    background: var(--yt-header-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.start,
.center,
.end {
    display: flex;
    align-items: center;
}

.start {
    width: 170px;
}

/* Roughly fixed width for menu/logo alignment */
.center {
    flex: 1;
    justify-content: center;
}

.end {
    width: 170px;
    justify-content: flex-end;
}

.menu-icon {
    width: 24px;
    height: 24px;
    margin-right: 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 3px 0;
}

.menu-icon .bar {
    height: 2px;
    background: #fff;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 18px;
    letter-spacing: -0.5px;
}

.play-icon {
    background: red;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 4px;
    font-size: 12px;
}

/* Search Bar */
.search-bar {
    display: flex;
    width: 100%;
    max-width: 600px;
    margin: 0 40px;
}

.search-bar input {
    width: 100%;
    background: var(--yt-search-bg);
    border: 1px solid var(--yt-search-border);
    border-right: none;
    border-radius: 40px 0 0 40px;
    padding: 8px 16px;
    color: var(--yt-text);
    font-size: 16px;
    outline: none;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.search-bar input:focus {
    border-color: #1c62b9;
    /* Blue focus like YT */
    margin-left: 0;
}

.search-btn {
    background: #222;
    border: 1px solid var(--yt-search-border);
    border-radius: 0 40px 40px 0;
    padding: 0 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.yt-icon {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.profile-icon {
    width: 32px;
    height: 32px;
    background: #5c6bc0;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
}

/* Main Layout */
.yt-main {
    margin-top: 56px;
    display: flex;
    justify-content: center;
    padding: 24px;
    gap: 24px;
    max-width: 1700px;
    /* Max wide */
    margin-left: auto;
    margin-right: auto;
}

.primary-col {
    flex: 1;
    max-width: 950px;
    /* Primary video limit */
    min-width: 0;
    /* Flexbox trick */
}

.secondary-col {
    width: 350px;
    display: none;
    /* Hide on small, show on large */
}

@media (min-width: 1000px) {
    .secondary-col {
        display: block;
    }
}

/* Video Player */
.player-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: black;
    margin-bottom: 12px;
    border-radius: 12px;
    /* YT Rounded corners update */
    overflow: hidden;
}

#player {
    width: 100%;
    height: 100%;
}

/* Video Info */
.video-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    margin-bottom: 8px;
}

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.channel-info {
    display: flex;
    align-items: center;
}

.avatar {
    width: 40px;
    height: 40px;
    background: #aaa;
    border-radius: 50%;
    margin-right: 12px;
}

.channel-info .text {
    margin-right: 24px;
}

.channel-info h3 {
    font-size: 16px;
    font-weight: 500;
}

.channel-info span {
    font-size: 12px;
    color: var(--yt-text-sec);
}

.subscribe-btn {
    background: var(--yt-text);
    color: var(--yt-bg);
    border: none;
    border-radius: 18px;
    padding: 0 16px;
    height: 36px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.subscribe-btn:hover {
    background: #d9d9d9;
}

/* Buttons Row */
.like-btn-group {
    background: #272727;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    height: 36px;
}

.like-btn {
    background: transparent;
    border: none;
    padding: 0 16px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 500;
}

.like-btn:hover {
    background: #3f3f3f;
}

/* Description/Panel */
.description-box {
    background: var(--yt-panel-bg);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 24px;
    font-size: 14px;
}

.description-box .metadata {
    font-weight: 500;
    margin-bottom: 8px;
}

/* Inputs in description */
.setup-controls {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.yt-input {
    background: transparent;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 6px 10px;
    color: white;
    font-family: inherit;
    font-size: 14px;
    width: 80px;
    text-align: center;
}

/* Visibility */
.hidden {
    display: none !important;
}

/* Active Countdown Styling */
.countdown-hero {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    padding: 20px 0;
    letter-spacing: 2px;
}

.yt-text-btn {
    background: transparent;
    border: none;
    color: #3ea6ff;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    margin-right: 16px;
    text-transform: uppercase;
}

.yt-text-btn:hover {
    color: #69b9ff;
}

/* Fake Sidebar Items */
.video-card {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    border-radius: 8px;
    /* Smooth corners */
    padding: 8px;
    /* Click target padding */
    transition: background-color 0.2s;
}

.video-card:hover {
    background-color: #272727;
}

.thumbnail {
    width: 168px;
    height: 94px;
    background: #333;
    border-radius: 8px;
    flex-shrink: 0;
}

.card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-info h4 {
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-info span {
    font-size: 12px;
    color: var(--yt-text-sec);
}

/* Flashing Animation */
@keyframes strobe {
    0% {
        background-color: var(--yt-bg);
    }

    50% {
        background-color: #4a4a4a;
    }

    100% {
        background-color: var(--yt-bg);
    }
}

.party-flash {
    animation: strobe 0.2s infinite;
}

/* Preset Card Styling */
.preset-card {
    border: 2px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
}

.preset-card:hover {
    border-color: var(--yt-red);
    transform: scale(1.02);
}

/* Player Placeholder */
.player-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--yt-text-sec);
    font-size: 16px;
    text-align: center;
    padding: 20px;
}

/* Help Link */
.help-link {
    width: 28px;
    height: 28px;
    border: 1px solid #555;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    text-decoration: none;
}

.help-link:hover {
    border-color: #fff;
    color: #fff;
}

/* Mark Drop Animation */
@keyframes pulse-success {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.drop-captured {
    animation: pulse-success 0.3s ease-out;
}

/* Live Clock */
.live-clock {
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
    letter-spacing: 1px;
}

/* ========== MOBILE RESPONSIVE STYLES ========== */

/* Tablets and smaller */
@media (max-width: 768px) {
    .yt-header {
        padding: 0 12px;
        height: 50px;
    }

    .logo span {
        font-size: 14px;
    }

    .play-icon {
        font-size: 10px;
        padding: 2px 6px;
    }

    .yt-main {
        padding: 12px;
        flex-direction: column;
    }

    .primary-col {
        max-width: 100%;
    }

    .secondary-col {
        width: 100%;
        display: block;
        margin-top: 20px;
    }

    .video-title {
        font-size: 16px;
        line-height: 22px;
    }

    .countdown-hero {
        font-size: 2rem;
    }

    .setup-controls {
        flex-direction: column;
        gap: 12px;
    }

    .yt-input {
        width: 100% !important;
    }

    .live-clock {
        font-size: 12px;
        padding: 4px 8px;
    }

    .end {
        gap: 8px !important;
    }

    .yt-text-btn {
        font-size: 11px;
        padding: 4px 8px !important;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .yt-header {
        height: 48px;
        padding: 0 8px;
    }

    .logo span {
        font-size: 12px;
    }

    .play-icon {
        display: none;
    }

    .yt-main {
        padding: 8px;
        margin-top: 48px;
    }

    .player-container {
        border-radius: 8px;
    }

    .video-title {
        font-size: 14px;
        line-height: 20px;
    }

    .countdown-hero {
        font-size: 1.8rem;
        padding: 10px 0;
    }

    .description-box {
        padding: 10px;
    }

    .action-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .channel-info {
        width: 100%;
    }

    .video-card {
        flex-direction: column;
    }

    .thumbnail {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }

    .live-clock {
        font-size: 11px;
        padding: 3px 6px;
    }

    .end .yt-text-btn:not(:last-child) {
        display: none;
    }

    /* Show only essential buttons on mobile */
    .end a[href="add_drop.html"] {
        display: inline-flex;
    }
}

/* Very small phones */
@media (max-width: 360px) {
    .logo span {
        font-size: 11px;
    }

    .countdown-hero {
        font-size: 1.5rem;
    }

    .live-clock {
        display: none;
    }
}