:root {
    --bg-color: #1a1b1e;
    --card-bg: #2b2d31;
    --text-primary: #f2f3f5;
    --text-secondary: #b5bac1;
    --accent: #5865f2;
    --accent-hover: #4752c4;
    --danger: #da373c;
    --border-radius: 8px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'gg sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 2rem;
    display: flex;
    justify-content: center;
}

.container {
    max-width: 800px;
    width: 100%;
}

h1 {
    text-align: center;
    color: var(--accent);
    margin-bottom: 2rem;
}

h2 {
    font-size: 1.2rem;
    margin-top: 0;
    border-bottom: 2px solid #3f4147;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    background: #2f3136;
    color: #b9bbbe;
    padding: 10px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
    transition: 0.2s;
}

.tab-btn.active {
    background: #5865F2;
    color: white;
}

.form-group-row {
    display: flex;
    justify-content: space-between;
}

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px;
    background-color: #1e1f22;
    border: 1px solid #1e1f22;
    border-radius: 4px;
    color: var(--text-primary);
    box-sizing: border-box;
    font-size: 1rem;
    font-family: inherit;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
}

button {
    width: 100%;
    padding: 12px;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

button:hover {
    background-color: var(--accent-hover);
}

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

.schedule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e1f22;
    /* Slightly darker than card */
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.schedule-content {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex: 1;
    overflow: hidden;
    /* Prevent text overflow */
}

.thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #404249;
    cursor: pointer;
    flex-shrink: 0;
}

.schedule-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow: hidden;
}

.header {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    flex-wrap: wrap;
}

.channel-name {
    color: #f2f3f5;
    font-weight: bold;
    font-size: 1rem;
}

.time {
    color: #949ba4;
    font-size: 0.85rem;
}

.message-preview {
    color: #dbdee1;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta {
    font-size: 0.75rem;
    color: #949ba4;
}

.actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.edit-btn,
.delete-btn {
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.edit-btn {
    background-color: #5865f2;
}

.delete-btn {
    background-color: #da373c;
}

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

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--card-bg);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #3f4147;
}

.modal-header h2 {
    margin: 0;
    border: none;
    padding: 0;
}

.modal-close {
    width: auto;
    background: transparent;
    color: #b5bac1;
    font-size: 1.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

.modal-close:hover {
    background: #3f4147;
    color: white;
}

#editForm {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 1.5rem;
}

.btn-cancel {
    flex: 1;
    background: #4f545c;
}

.btn-cancel:hover {
    background: #686d75;
}

.btn-save {
    flex: 2;
    background: var(--accent);
}

.btn-save:hover {
    background: var(--accent-hover);
}