* {
    box-sizing: border-box;
}

:root { 
    --yt-red: #FF0000; 
    --yt-dark-bg: #0f0f0f; 
    --yt-card-bg: #1e1e1e; 
    --yt-text: #ffffff; 
    --yt-subtext: #aaaaaa; 
    --yt-border: #333333;
    --yt-accent: #f1f1f1; 
}

body { 
    background-color: var(--yt-dark-bg); 
    color: var(--yt-text); 
    font-family: 'Roboto', sans-serif; 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    height: 100dvh; 
    margin: 0;
    overflow: hidden;
    background-image: radial-gradient(circle at 2px 2px, #222 1px, transparent 0);
    background-size: 40px 40px;
}

.main-content {
    flex: 1; 
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 20px;
}

.app-container { 
    background-color: var(--yt-card-bg); 
    padding: 40px; 
    border-radius: 24px; 
    width: 100%; 
    max-width: 420px; 
    text-align: center; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    border: 1px solid var(--yt-border);
    position: relative;
}

.info-icon-btn {
    background: none; border: none; color: var(--yt-subtext);
    cursor: pointer; padding: 5px; transition: color 0.2s, transform 0.2s;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
}
.info-icon-btn:hover { color: var(--yt-text); transform: scale(1.1); }
.info-icon-btn svg { width: 22px; height: 22px; fill: currentColor; }

.subtitle-top { color: var(--yt-subtext); font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 8px; font-weight: 500; }
h1 { font-size: 32px; margin: 0; font-weight: 700; }

#status-msg { 
    background: #121212;
    padding: 12px;
    border-radius: 12px;
    color: var(--yt-accent); 
    font-size: 14px; 
    margin-bottom: 20px;
    font-family: 'Roboto Mono', monospace;
    border: 1px solid #222;
}

.btn { 
    border: none; 
    padding: 14px 28px; 
    border-radius: 30px; 
    cursor: pointer; 
    width: 100%; 
    font-weight: 700; 
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s;
    margin-bottom: 12px;
}

#login-btn { background-color: var(--yt-red); color: white; }
#login-btn:hover { background-color: #cc0000; transform: translateY(-1px); }

.btn-primary { background-color: var(--yt-red); color: white; border: none; }
.btn-primary:hover { background-color: #cc0000; transform: translateY(-1px); }

.btn-secondary { background-color: transparent; color: var(--yt-text); border: 1px solid var(--yt-text); }
.btn-secondary:hover { background-color: rgba(255, 255, 255, 0.1); }

#next-batch-btn { 
    display: none; 
}

.btn:disabled { background-color: #333; color: #666; cursor: not-allowed; border: none; }

#playlist-container { display: none; }
.custom-dropdown { position: relative; width: 100%; text-align: left; margin-bottom: 15px; }
#playlist-search { 
    width: 100%; 
    padding: 14px 18px; 
    background-color: #121212; 
    color: white; 
    border: 1px solid var(--yt-border); 
    border-radius: 12px; 
    box-sizing: border-box; 
    outline: none; 
    font-size: 15px;
}

.title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

#dropdown-list { 
    display: none; position: absolute; top: 100%; left: 0; right: 0; 
    background-color: #282828; border: 1px solid var(--yt-border); 
    border-radius: 12px; max-height: 200px; overflow-y: auto; 
    list-style: none; padding: 5px 0; z-index: 1000; margin-top: 5px;
}
#dropdown-list li { padding: 12px 18px; cursor: pointer; border-bottom: 1px solid #333; font-size: 14px; }
#dropdown-list li:hover { background-color: #3e3e3e; }

.g-icon { width: 18px; height: 18px; fill: currentColor; }

.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.7); display: none;
    align-items: center; justify-content: center; z-index: 1000;
    opacity: 0; transition: opacity 0.2s ease;
}
.modal-overlay.active { display: flex; opacity: 1; }

.modal-content {
    background-color: var(--yt-card-bg); padding: 30px; border-radius: 16px;
    width: 90%; max-width: 380px; text-align: left; border: 1px solid var(--yt-border);
    transform: translateY(20px); transition: transform 0.2s ease;
}


.modal-overlay.active .modal-content { transform: translateY(0); }

.modal-content h2 { margin-top: 0; font-size: 20px; border-bottom: 1px solid var(--yt-border); padding-bottom: 10px; color: var(--yt-text); }
.modal-content ul { padding-left: 20px; color: var(--yt-subtext); font-size: 14px; line-height: 1.6; }
.modal-content li { margin-bottom: 12px; }
.modal-content strong { color: var(--yt-text); }

.close-modal {
    background-color: transparent; color: var(--yt-text); border: 1px solid var(--yt-text);
    padding: 8px 16px; border-radius: 20px; cursor: pointer; width: 100%;
    margin-top: 10px; font-weight: bold;
}
.close-modal:hover { background-color: rgba(255,255,255,0.1); }

footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    padding: 30px 20px;
    text-align: center;
    font-size: 11px;
    color: var(--yt-subtext);
    max-width: 600px;
    width: 100%;
}
footer a {
    color: var(--yt-subtext);
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.2s;
}
footer a:hover { color: var(--yt-text); text-decoration: underline; }
.disclaimer-text { margin-bottom: 8px; display: block; }