/* General Styling */
body {
    font-family: 'Raleway', sans-serif;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Search Form Container */
#youtube-search-form {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-x: hidden;
    max-height: 600px; /* Set a maximum height for scrollability */
    overflow-y: auto; /* Enable vertical scrolling */
    justify-content: center;
}

#youtube-search-form h3 {
    margin-bottom: 15px;
    font-family: 'Raleway', sans-serif;
    font-size: 20px;
    color: #333;
    text-align: center;
}

/* Search Input */
.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    padding: 10px;
    z-index: 1;
}

.search-box input[type="text"] {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="%230066ff" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>') no-repeat 15px center;
    background-size: 20px;
}

.search-box input[type="text"].searching {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="%23999999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/></svg>');
    border-color: #999;
}

.search-box input[type="text"]:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.search-box input[type="text"]:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    border-color: #ddd;
    color: #999;
}

.search-box input[type="text"].queue-full {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="%23999999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg>');
}

.search-box input[type="text"]::placeholder {
    color: #999;
}

/* Search Results Container */
#search-results-container {
    margin-top: 20px;
}

#search-results-container h4 {
    font-family: 'Raleway', sans-serif;
    font-size: 18px;
    color: #444;
    margin-bottom: 10px;
}

#search-results-container ul {
    list-style: none;
    padding: 0;
}

#search-results-container li {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    background-color: #fff;
    transition: box-shadow 0.3s ease;
}

#search-results-container li:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Thumbnail Image */
#search-results-container li img {
    margin-right: 10px;
    border-radius: 4px;
width: 80px; /* Adjust width to make it larger */
    height: 80px; /* Adjust height to maintain aspect ratio */
    object-fit: cover; 
}

/* Add to Queue Button */
.add-to-queue-btn {
    margin-left: auto;
    padding: 8px 15px;
    font-family: 'Raleway', sans-serif;
    font-size: 14px;
    color: #fff;
    background-color: #28a745;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-to-queue-btn:hover {
    background-color: #218838;
}

/* Video Queue List */
#video-queue-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    counter-reset: queue-counter;
    position: relative;
}

#video-queue-list li {
    display: flex;
    align-items: center;
    padding: 10px 10px 10px 45px;
    margin-bottom: 10px;
    background-color: transparent;
    position: relative;
    overflow: hidden;
    font-weight: bold;
    font-size: 18px;
    font-family: 'Raleway', sans-serif;
    color: #000000;
}

#video-queue-list li:hover {
    transform: none;
}

#video-queue-list li::before {
    counter-increment: queue-counter;
    content: counter(queue-counter);
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #0066cc;
    color: #ffffff;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    z-index: 2;
    border-radius: 50%;
}


/* Remove Video Button */
.remove-video-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    margin: 0;
    padding: 0 20px;
    font-family: 'Raleway', sans-serif;
    font-size: 14px;
    color: #fff;
    background-color: rgba(220, 53, 69, 0.9);
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

#video-queue-list li:hover .remove-video-btn {
    opacity: 1;
}

.remove-video-btn:hover {
    background-color: rgba(200, 35, 51, 1);
}

#youtube-player-container {
    margin: 20px 0;
}

#player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    width: 100%;
}

#player-controls button {
    margin-right: 10px;
    padding: 5px 15px;
    cursor: pointer;
}

.autoplay-message {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    text-align: center;
}

.player-loading {
    background-color: #f8f9fa;
    color: #6c757d;
    padding: 15px;
    text-align: center;
    border-radius: 4px;
    margin-bottom: 10px;
    font-style: italic;
}

.queue-empty-message {
    background-color: #e2e3e5;
    color: #383d41;
    padding: 10px;
    margin-top: 10px;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

.youtube-search-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin: 20px auto;
    max-width: 800px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#youtube-search-title {
    flex: 1;
    padding: 8px;
    font-family: 'Raleway', sans-serif;
    font-size: 16px;
	font-weight: 600; /* Medium-bold weight */
    border: 1px solid #ddd;
    border-radius: 4px;
}

.video-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.video-result-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.video-thumbnail img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
}

.video-info {
    flex: 1;
}

.video-title {
    font-family: 'Raleway', sans-serif;
    font-size: 16px;
    margin-bottom: 10px;
}

.add-to-queue-btn {
    padding: 6px 12px;
    font-family: 'Raleway', sans-serif;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.add-to-queue-btn:hover {
    background-color: #45a049;
}

.add-to-queue-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.error-message {
    font-family: 'Raleway', sans-serif;
    color: #dc3545;
    padding: 10px;
    margin: 10px 0;
    background-color: #f8d7da;
    border-radius: 4px;
}

.success-message {
    font-family: 'Raleway', sans-serif;
    color: #28a745;
    padding: 10px;
    margin: 10px 0;
    background-color: #d4edda;
    border-radius: 4px;
}

/* Player Error Overlay Styles */
.player-error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.error-content {
    font-family: 'Raleway', sans-serif;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    max-width: 80%;
}

.error-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.error-message {
    font-family: 'Raleway', sans-serif;
    color: #dc3545;
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: bold;
}

.error-subtitle {
    font-family: 'Raleway', sans-serif;
    color: #6c757d;
    font-size: 14px;
    font-style: italic;
}

/* Ensure the player container has relative positioning for overlay */
#youtube-player-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Karaoke Scoring System Styles */
.karaoke-scoring-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.scoring-interface {
    margin: 20px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.score-buttons {
    text-align: center;
    margin-bottom: 20px;
}

.score-options {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.score-btn {
    padding: 10px 15px;
    font-family: 'Raleway', sans-serif;
    border: 2px solid #ddd;
    background-color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
}

.score-btn:hover {
    border-color: #ffd700;
}

.score-btn.selected {
    border-color: #ffd700;
    background-color: #fff3cd;
}

.score-comment {
    margin: 20px 0;
}

#score-comment {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 80px;
}

.submit-score-btn {
    width: 100%;
    padding: 12px;
    font-family: 'Raleway', sans-serif;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.submit-score-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.recent-scores {
    margin-top: 30px;
}

.score-entry {
    font-family: 'Raleway', sans-serif;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.score-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.performer-name {
    font-family: 'Raleway', sans-serif;
    font-weight: bold;
}

.score-date {
    font-family: 'Raleway', sans-serif;
    color: #666;
    font-size: 0.9em;
}

.score-stars {
    color: #ffd700;
    font-size: 18px;
    margin: 5px 0;
}

.score-comment {
    font-family: 'Raleway', sans-serif;
    font-style: italic;
    color: #666;
    margin-top: 5px;
}

/* Karaoke Scoring Modal Styles */
.scoring-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 50px auto;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.skip-score-btn {
    width: 100%;
    padding: 12px;
    font-family: 'Raleway', sans-serif;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}

.skip-score-btn:hover {
    background-color: #5a6268;
}

/* Update existing scoring styles to work within modal */
.scoring-interface {
    margin: 20px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

/* Add animation for modal */
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.scoring-modal.show {
    display: block;
    animation: modalFadeIn 0.3s ease-in-out;
}

/* Karaoke Score Overlay */
.karaoke-score-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    color: white;
    transition: opacity 0.3s ease-in-out;
}

.karaoke-score-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.score-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 80%;
    max-width: 500px;
}

.score-animation {
    font-family: 'Raleway', sans-serif;
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.calculating {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.final-score {
    font-family: 'Raleway', sans-serif;
    font-size: 72px;
    font-weight: bold;
    color: #ffd700;
    display: none;
}

.score-details {
    font-family: 'Raleway', sans-serif;
    font-size: 24px;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.score-breakdown {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
}

.score-message {
    font-family: 'Raleway', sans-serif;
    font-size: 32px;
    color: #ffd700;
    margin-top: 20px;
}

/* Score animations */
@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes scoreCount {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.score-appear {
    animation: scoreAppear 0.5s ease-out;
}

@keyframes scoreAppear {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Score colors */
.score-perfect {
    color: #ffd700;
}

.score-great {
    color: #00ff00;
}

.score-good {
    color: #00ffff;
}

.score-okay {
    color: #ff9900;
}

/* Recent Karaoke Scores Styles */
.recent-karaoke-scores {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
}

.recent-karaoke-scores h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.scores-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.score-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.score-card:hover {
    transform: translateY(-2px);
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.user-name {
    font-family: 'Raleway', sans-serif;
    font-weight: bold;
    color: #333;
}

.performance-date {
    font-family: 'Raleway', sans-serif;
    color: #666;
    font-size: 0.9em;
}

.score-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-score {
    font-family: 'Raleway', sans-serif;
    font-size: 36px;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 8px;
    min-width: 100px;
    text-align: center;
}

.perfect-score {
    background: linear-gradient(45deg, #ffd700, #ffa500);
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.excellent-score {
    background: linear-gradient(45deg, #00ff00, #008000);
    color: white;
}

.great-score {
    background: linear-gradient(45deg, #00ffff, #008b8b);
    color: white;
}

.good-score {
    background: linear-gradient(45deg, #ff9900, #ff6600);
    color: white;
}

.score-breakdown {
    display: flex;
    gap: 20px;
}

.breakdown-item {
    text-align: center;
}

.breakdown-item .label {
    font-family: 'Raleway', sans-serif;
    display: block;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.breakdown-item .value {
    font-family: 'Raleway', sans-serif;
    font-weight: bold;
    color: #333;
}

.no-scores-message {
    font-family: 'Raleway', sans-serif;
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
    font-style: italic;
}

/* Animation for new scores */
@keyframes scoreCardAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.score-card {
    animation: scoreCardAppear 0.5s ease-out forwards;
}

/* Karaoke Settings Styles */
.karaoke-settings-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.karaoke-settings-container h2 {
    font-family: 'Raleway', sans-serif;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setting-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    border-radius: 8px;
    background-color: #fff;
    margin-bottom: 15px;
}

.setting-row .toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.setting-row label {
    font-family: 'Raleway', sans-serif;
    font-weight: bold;
    color: #444;
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin: 0;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.toggle-switch input:disabled + .slider {
    background-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.65;
}

.toggle-switch input:disabled + .slider:before {
    background-color: #ccc;
}

.save-settings-btn {
    padding: 12px 24px;
    font-family: 'Raleway', sans-serif;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.save-settings-btn:hover {
    background-color: #45a049;
}

.setting-status {
    font-family: 'Raleway', sans-serif;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.setting-status.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.setting-status.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Additional Karaoke Settings Styles */
.setting-description {
    font-family: 'Raleway', sans-serif;
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.admin-setting {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.user-setting {
    padding: 15px;
    border-radius: 6px;
    background-color: #fff;
}

.toggle-switch input:disabled + .slider {
    background-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.65;
}

.toggle-switch input:disabled + .slider:before {
    background-color: #ccc;
}

.setting-row {
    flex-direction: column;
    align-items: flex-start;
}

.setting-row label {
    margin-bottom: 10px;
}

.toggle-switch {
    margin-bottom: 5px;
}

/* Replace the toggle switch styles with checkbox styles */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.setting-checkbox {
    font-family: 'Raleway', sans-serif;
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.setting-checkbox:checked {
    background-color: #2196F3;
    border-color: #2196F3;
}

.setting-checkbox:checked::before {
    font-family: 'Raleway', sans-serif;
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: bold;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.setting-checkbox:disabled {
    background-color: #e9ecef;
    border-color: #ccc;
    cursor: not-allowed;
    opacity: 0.65;
}

.setting-checkbox:disabled + label {
    font-family: 'Raleway', sans-serif;
    color: #6c757d;
    cursor: not-allowed;
}

.setting-row {
    padding: 15px;
    border-radius: 8px;
    background-color: #fff;
    margin-bottom: 15px;
}

.admin-setting {
    background-color: #f8f9fa;
}

.setting-description {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
    margin-left: 30px;
}

/* Update existing button styles */
.save-settings-btn {
    width: 100%;
    padding: 12px;
    font-family: 'Raleway', sans-serif;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.save-settings-btn:hover {
    background-color: #45a049;
}

.save-settings-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Status message styles */
.setting-status {
    font-family: 'Raleway', sans-serif;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
        gap: 15px;
    }

    #youtube-search-title,
    #search-videos-btn {
        width: 100%;
    }

    #search-videos-btn {
        padding: 12px;
    }
}

/* Loading State */
#search-videos-btn.loading {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Error State */
#youtube-search-title.error {
    border-color: #dc3545;
    background-color: #fff8f8;
}

#youtube-search-title.error::placeholder {
    color: #dc3545;
}

/* Success State */
#youtube-search-title.success {
    border-color: #28a745;
    background-color: #f8fff8;
}

/* API Key Container */
.api-key-container {
    max-width: 700px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* API Key Input */
#youtube-api-key {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    outline: none;
    transition: all 0.3s ease;
    background-color: #fff;
    color: #495057;
    margin-bottom: 15px;
}

#youtube-api-key:focus {
    border-color: #2196F3;
    box-shadow: 0 0 8px rgba(33, 150, 243, 0.2);
}

#youtube-api-key.masked {
    font-family: monospace;
    letter-spacing: 2px;
}

/* API Key Buttons Container */
.api-key-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* API Key Buttons */
#save-api-key,
#toggle-api-key,
#remove-api-key {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    font-size: 14px;
    color: white;
    flex: 1;
    min-width: 120px;
}

/* Save API Key Button */
#save-api-key {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
}

#save-api-key:hover {
    background: linear-gradient(45deg, #45a049, #3d8b40);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

/* Toggle API Key Button */
#toggle-api-key {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.2);
}

#toggle-api-key:hover {
    background: linear-gradient(45deg, #1976D2, #1565C0);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

/* Remove API Key Button */
#remove-api-key {
    background: linear-gradient(45deg, #dc3545, #c82333);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

#remove-api-key:hover {
    background: linear-gradient(45deg, #c82333, #bd2130);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Button Active States */
#save-api-key:active,
#toggle-api-key:active,
#remove-api-key:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Disabled Button States */
#save-api-key:disabled,
#toggle-api-key:disabled,
#remove-api-key:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

/* API Key Status Messages */
.api-key-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

.api-key-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.api-key-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .api-key-container {
        margin: 10px;
        padding: 15px;
    }

    .api-key-buttons {
        flex-direction: column;
    }

    #save-api-key,
    #toggle-api-key,
    #remove-api-key {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* YouTube API Key Settings Container */
.youtube-api-settings {
    max-width: 600px;
    margin: 20px auto;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.youtube-api-settings h3 {
    font-family: 'Raleway', sans-serif;
    margin: 0 0 20px;
    color: #333;
    font-size: 1.5em;
}

.api-key-form > div {
    margin-bottom: 20px;
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 20px;
    background: #f8f9fa;
    width: fit-content;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.using-custom .status-dot {
    background-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.using-default .status-dot {
    background-color: #ffc107;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

/* Warning Message */
.api-key-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 6px;
    margin-top: 12px;
}

.warning-icon {
    font-size: 1.2em;
}

.warning-text {
    font-size: 0.9em;
    color: #856404;
    line-height: 1.4;
}

/* Input Group */
.api-key-input-group {
    margin-top: 20px;
}

.api-key-input-group label {
    font-family: 'Raleway', sans-serif;
    display: block;
    margin-bottom: 8px;
    color: #495057;
    font-weight: 500;
}

.input-with-button {
    display: flex;
    gap: 10px;
    align-items: center;
}

.api-key-input {
    font-family: 'Raleway', sans-serif;
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1em;
    transition: all 0.2s;
}

.api-key-input:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.api-key-input.invalid-key {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.api-key-input.invalid-key:focus {
    box-shadow: 0 0 0 3px rgba(220,53,69,0.1);
}

/* Toggle Button */
.toggle-button {
    font-family: 'Raleway', sans-serif;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-button:hover {
    background: #e9ecef;
}

/* Action Buttons */
.api-key-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.action-button {
    font-family: 'Raleway', sans-serif;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.save-button {
    background: linear-gradient(45deg, #28a745, #218838);
    color: white;
}

.save-button:hover {
    background: linear-gradient(45deg, #218838, #1e7e34);
    transform: translateY(-1px);
}

.remove-button {
    background: linear-gradient(45deg, #dc3545, #c82333);
    color: white;
}

.remove-button:hover {
    background: linear-gradient(45deg, #c82333, #bd2130);
    transform: translateY(-1px);
}

/* Message Container */
.message-container {
    font-family: 'Raleway', sans-serif;
    padding: 12px;
    margin-top: 12px;
    border-radius: 6px;
    display: none;
}

.message-container.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-container.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Help Link */
.api-key-help {
    margin-top: 20px;
}

.help-link {
    font-family: 'Raleway', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #007bff;
    text-decoration: none;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.help-link:hover {
    background: rgba(0,123,255,0.1);
    color: #0056b3;
    text-decoration: none;
}

/* Dialog Styles */
.api-key-dialog {
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.api-key-dialog .ui-dialog-titlebar {
    background: #f8f9fa;
    border: none;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
}

.api-key-dialog .ui-dialog-buttonpane {
    border-top: 1px solid #dee2e6;
    padding: 15px;
    margin-top: 20px;
}

.api-key-dialog .ui-button {
    font-family: 'Raleway', sans-serif;
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.api-key-dialog .ui-button:first-child {
    background: #dc3545;
    color: white;
}

.api-key-dialog .ui-button:last-child {
    background: #6c757d;
    color: white;
}

.api-key-dialog .ui-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .youtube-api-settings {
        margin: 10px;
        padding: 15px;
    }

    .api-key-actions {
        flex-direction: column;
    }

    .action-button {
        width: 100%;
    }

    .input-with-button {
        flex-direction: column;
    }

    .toggle-button {
        width: 100%;
        margin-top: 8px;
    }
}

/* Marquee Container */
.marquee-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    background: #fff;
    padding: 20px 0;
    border: 1px solid #ddd;
}

.marquee-content {
    position: relative;
    height: 120px;
    margin: 0 auto;
    border: 1px solid #eee;
}

.marquee-item {
    position: absolute;
    display: flex;
    align-items: center;
    padding: 10px 10px 10px 35px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fdfdfd;
    overflow: hidden;
    transition: transform 0.1s linear;
    will-change: transform;
    cursor: pointer;
    min-width: 200px;
}

.marquee-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 2;
}

/* Ensure images don't stretch */
.marquee-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-right: 10px;
    border-radius: 4px;
}

/* Video title */
.marquee-item .video-title {
    font-family: 'Raleway', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    color: #333;
}

.warning {
    font-family: 'Raleway', sans-serif;
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* 3D circular red skip button styles */
#skip-video, .skip-btn {
    font-family: 'Raleway', sans-serif;
    min-width: 100px;
    height: 40px;
    border-radius: 4px;
    background: linear-gradient(145deg, #ff4444, #cc0000);
    border: none;
    box-shadow:
        2px 2px 4px rgba(0, 0, 0, 0.2),
        -2px -2px 4px rgba(255, 255, 255, 0.1);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    gap: 8px;
}

#skip-video::before, .skip-btn::before {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M6 4l12 8-12 8V4zm13 0v16h2V4h-2z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

#skip-video:hover, .skip-btn:hover {
    background: linear-gradient(145deg, #ff5555, #dd0000);
    transform: translateY(-1px);
    box-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.25),
        -2px -2px 4px rgba(255, 255, 255, 0.1);
}

#skip-video:active, .skip-btn:active {
    background: linear-gradient(145deg, #cc0000, #bb0000);
    transform: translateY(1px);
    box-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.3),
        -1px -1px 2px rgba(255, 255, 255, 0.1);
}

/* Hide the text but keep it accessible */
.btn-icon {
    display: none;
}