/* Base Styles for Dark Theme */
body 
{
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a1a1a; /* Dark background */
    color: #e0e0e0; /* Light text */
}

#viewer-body 
{
    visibility: hidden;
}

header 
{
    background-color: #b30000; /* Darker YouTube Red */
    color: white;
    padding: 20px 40px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); /* Deeper shadow */
    position: relative;
}

.header-logo 
{
    display: block; /* Ensures it takes up its own line */
    margin: 0 auto 10px auto; /* Center it and add space below */
    max-width: 200px; /* Approximately 10% of viewport width */
    height: auto; /* Maintain aspect ratio */
    border-radius: 50%; /* Make it circular if the image supports it */
}

header h1 
{
    margin: 0 0 5px 0;
}

header p {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.8; /* Slightly less opaque */
}

main {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background-color: #282828; /* Slightly lighter dark for content areas */
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.6); /* More prominent shadow */
}

footer {
    text-align: center;
    padding: 10px;
    margin-top: 20px;
    font-size: 0.8em;
    color: #a0a0a0; /* Lighter grey for footer */
}

/* --- Buttons --- */
button {
    padding: 10px 15px;
    margin: 5px 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s, color 0.2s;
    color: white; /* Ensure button text is white for dark theme */
}

.add-btn, #add-member-btn {
    background-color: #007bff; /* Keep original blue for consistency, or choose a darker shade */
}

.add-btn:hover, #add-member-btn:hover {
    background-color: #0056b3;
}

.delete-btn {
    background-color: #dc3545; /* Keep original red */
    color: white;
    padding: 5px 10px;
    font-size: 0.9em;
}

.delete-btn:hover {
    background-color: #c82333;
}

/* --- Table Styling (Dashboard & Videos) --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #444; /* Darker border */
}

th {
    background-color: #3a3a3a; /* Darker background for headers */
    font-weight: bold;
    color: #f0f0f0; /* Lighter text for headers */
}

tr:hover {
    background-color: #333333; /* Hover effect for dark theme */
}

/* Links in Table */
td a {
    color: #4da6ff; /* Lighter blue for links in dark mode */
    text-decoration: none;
}

td a:hover {
    text-decoration: underline;
}

/* --- Content Control Page Specific --- */
.back-link {
    position: absolute;
    top: 25px;
    left: 40px;
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
}

.back-link:hover {
    text-decoration: underline;
}

.channels-section, .videos-section {
    margin-bottom: 30px;
    padding: 15px;
    border: 1px solid #444; /* Darker border for sections */
    border-radius: 4px;
    background-color: #2e2e2e; /* Slightly different background for sections */
}

.section-description {
    font-style: italic;
    color: #a0a0a0; /* Lighter grey */
    font-size: 0.9em;
}

/* Channel List */
.channel-list {
    list-style: none;
    padding: 0;
}

.channel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #444; /* Darker dashed border */
}

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

.channel-item span {
    font-weight: 500;
}

/* Video Table (using table style above) */
.video-table .delete-btn {
    padding: 3px 8px; /* Smaller delete button */
}


/* --- Modal (Popup) Styles --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed; 
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.7); /* Black w/ opacity */
}

.modal-content {
    background-color: #282828; /* Matches main content */
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #444;
    border-radius: 8px;
    width: 80%;
    max-width: 400px; /* Prevent it from getting too wide */
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
    text-align: center;
}

.modal-content h3 {
    margin-top: 0;
    color: #f0f0f0;
}

/* Modal Input Styling */
.modal-content input[type="text"] {
    width: 90%;
    padding: 10px;
    margin: 15px 0;
    background-color: #3a3a3a;
    border: 1px solid #555;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 1em;
}

.modal-content input[type="text"]:focus {
    outline: none;
    border-color: #007bff;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.save-btn {
    background-color: #007bff; /* Blue */
}

.save-btn:hover {
    background-color: #0056b3;
}

.cancel-btn {
    background-color: #666; /* Grey */
}

.cancel-btn:hover {
    background-color: #555;
}