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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    margin-bottom: 30px;
    text-align: center;
}

header h1 {
    margin-bottom: 2px;
    text-align: center;
}

header p {
    color: #666;
    margin-top: 0;
    text-align: center;
}

h1, h2, h3 {
    color: #333;
    text-align: center;
}

/* Stream Setup */
.stream-setup {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 20px;
    margin-bottom: 30px;
}

.video-preview-container {
    margin-top: 10px;
    margin-bottom: 20px;
}

#video-preview {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background-color: #000;
    aspect-ratio: 16/9;
    margin-bottom: 15px;
}

.stream-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.control-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background-color: #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background-color 0.3s;
}

.control-button:hover {
    background-color: #e5e5e5;
}

.control-button.muted i.fa-microphone {
    color: #f00;
}

.control-button.video-off i.fa-video {
    color: #f00;
}

.control-button.screen-on {
    background-color: #4285f4;
    color: white;
}

.stream-settings {
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
    text-align: center;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    text-align: center;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.form-group textarea {
    height: 80px;
    resize: vertical;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.start-stream-button {
    background-color: #f00;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.start-stream-button:hover {
    background-color: #d00;
}

.cancel-button {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
}

.cancel-button:hover {
    background-color: #e5e5e5;
}

/* Live Streaming */
.live-streaming {
    margin-bottom: 30px;
}

.live-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    margin: 0 auto 20px;
    width: fit-content;
}

.live-dot {
    width: 12px;
    height: 12px;
    background-color: #f00;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 1.5s infinite;
}

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

.stream-container {
    margin-bottom: 20px;
}

#live-video-player {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background-color: #000;
    aspect-ratio: 16/9;
}

.stream-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.stop-stream-button {
    background-color: #666;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.stop-stream-button:hover {
    background-color: #555;
}

/* Stream Ended */
.stream-ended {
    text-align: center;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 40px 20px;
}

.stream-ended p {
    margin-bottom: 20px;
    color: #666;
}

.links-section {
    margin: 20px 0;
    text-align: center;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.links-section h3 {
    margin-bottom: 15px;
    text-align: center;
}

#links-list {
    list-style-type: none;
    padding: 0;
    text-align: center;
}

#links-list li {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#links-list a {
    color: #4285f4;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
}

#links-list a:hover {
    text-decoration: underline;
}

.waiting-message {
    color: #666;
    font-style: italic;
    padding: 10px;
    text-align: center;
    animation: pulse 1.5s infinite;
}

.hidden {
    display: none;
}

/* Status Message */
.status-message {
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 4px;
    display: none;
}

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

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

/* Progress Bar */
#progress-container {
    margin: 15px 0;
    background-color: #f5f5f5;
    border-radius: 4px;
    height: 20px;
    position: relative;
}

#progress-bar {
    height: 100%;
    background-color: #4285f4;
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s;
}

#progress-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    color: #333;
}

/* Enhanced Live Indicator for the header */
.header-live-indicator {
    display: block;
    width: 80px;
    height: 30px;
    background-color: #f00;
    color: white;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    border-radius: 4px;
    margin: 0 auto 15px;
    position: relative;
    animation: pulse 1.5s infinite;
}

.header-live-indicator:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
}

/* Additional styles for YouTube streaming */
.info-box {
    background-color: #e8f4f8;
    border: 1px solid #b3d9e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.info-box h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c5aa0;
}

.info-box ol {
    margin: 0;
    padding-left: 20px;
    text-align: left;
}

.info-box li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.info-box a {
    color: #2c5aa0;
    text-decoration: underline;
}

.secondary-button {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.secondary-button:hover {
    background-color: #e5e5e5;
}

.status-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .info-box {
        padding: 15px;
    }
    
    .info-box ol {
        padding-left: 15px;
    }
    
    .info-box li {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .stream-controls {
        gap: 10px;
    }
    
    .control-button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .start-stream-button,
    .stop-stream-button {
        width: 100%;
    }
}

/* Channel Dropdown */
.channel-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 300px;
}

.channel-dropdown-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
}

.channel-dropdown-item:hover {
    background-color: #f5f5f5;
}

.channel-dropdown-item:last-child {
    border-bottom: none;
}

/* Login Modal */
.login-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.login-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.login-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.login-modal-close:hover,
.login-modal-close:focus {
    color: #000;
}

.login-modal-content h2 {
    margin-top: 0;
    margin-bottom: 10px;
    text-align: center;
}

.login-modal-content p {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
}

.login-form,
.signup-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-form input,
.signup-form input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.login-form input::placeholder,
.signup-form input::placeholder {
    text-align: center;
}

.login-form button,
.signup-form button {
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

#login-submit-btn,
#signup-submit-btn {
    background-color: #4285f4;
    color: white;
}

#login-submit-btn:hover,
#signup-submit-btn:hover {
    background-color: #357ae8;
}

.signup-section {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.signup-section p {
    margin-bottom: 10px;
}

#show-signup-btn,
#back-to-login-btn {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

#show-signup-btn:hover,
#back-to-login-btn:hover {
    background-color: #e5e5e5;
}

.error-message {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

/* Small Button Styles */
.small-blue-btn {
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-left: 5px;
}

.small-blue-btn:hover {
    background-color: #357ae8;
}

.small-green-btn {
    background-color: #34a853;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-left: 5px;
}

.small-green-btn:hover {
    background-color: #2d8e47;
}

/* Golden and Silver Button Styles */
.golden-button {
    background: linear-gradient(135deg, #f4d03f 0%, #f39c12 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 6px rgba(243, 156, 18, 0.3);
}

.golden-button:hover {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    box-shadow: 0 6px 8px rgba(243, 156, 18, 0.4);
}

.silver-button {
    background: linear-gradient(135deg, #e8e8e8 0%, #c0c0c0 100%);
    color: #333;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.silver-button:hover {
    background: linear-gradient(135deg, #d4d4d4 0%, #a8a8a8 100%);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

/* Channel Finder Modal */
.channel-finder-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.channel-finder-modal-content {
    background-color: #fefefe;
    margin: 3% auto;
    padding: 30px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.channel-finder-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.channel-finder-modal-close:hover,
.channel-finder-modal-close:focus {
    color: #000;
}

.channel-finder-modal-content h2 {
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    color: #333;
}

.finder-type-selection {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.finder-type-btn {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #ddd;
    background-color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    color: #666;
}

.finder-type-btn:hover {
    border-color: #4285f4;
    color: #4285f4;
}

.finder-type-btn.active {
    background-color: #4285f4;
    color: white;
    border-color: #4285f4;
}

.finder-input-section {
    margin-bottom: 20px;
}

.finder-input-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
    text-align: center;
}

.finder-input-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

#finder-prefix {
    padding: 12px 15px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
}

#finder-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    font-size: 14px;
    text-align: left;
}

.get-id-btn {
    padding: 12px 20px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
    transition: background-color 0.3s;
}

.get-id-btn:hover {
    background-color: #357ae8;
}

.finder-result-section {
    margin-bottom: 20px;
}

.finder-result-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
    text-align: center;
}

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

#finder-result {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    font-size: 14px;
    text-align: center;
    font-weight: 600;
    color: #333;
}

.copy-id-btn {
    padding: 12px 20px;
    background-color: #34a853;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.copy-id-btn:hover {
    background-color: #2d8e47;
}

.finder-actions {
    text-align: center;
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.use-id-btn {
    padding: 14px 40px;
    background-color: #f4d03f;
    color: #333;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(244, 208, 63, 0.3);
}

.use-id-btn:hover {
    background-color: #f39c12;
    box-shadow: 0 6px 8px rgba(244, 208, 63, 0.4);
}

.form-help-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    text-align: center;
}

@media (max-width: 768px) {
    .finder-type-selection {
        flex-direction: column;
    }
    
    .finder-input-group {
        flex-wrap: wrap;
    }
    
    #finder-prefix {
        border-radius: 4px 4px 0 0;
        width: 100%;
        text-align: center;
    }
    
    #finder-input {
        border: 1px solid #ddd;
        border-radius: 0;
        width: 100%;
    }
    
    .get-id-btn {
        border-radius: 0 0 4px 4px;
        width: 100%;
    }
}
