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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

h1 {
    color: white;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2.5em;
}

h2 {
    color: #333;
    margin-bottom: 20px;
}

.content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .content {
        grid-template-columns: 1fr;
    }
}

/* Form Section */
.form-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.news-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-height: 900px;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

input[type="text"],
input[type="datetime-local"],
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="datetime-local"]:focus,
select:focus {
    outline: none;
    border-color: #667eea;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
}

/* Dropzone */
.dropzone {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f9f9f9;
}

.dropzone:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.dropzone.dragover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: scale(1.02);
}

.dropzone.has-file {
    border-color: #34c759;
    background: #f0fff4;
}

.dropzone p {
    color: #666;
    margin-bottom: 10px;
}

.file-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

/* Buttons */
button {
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

#submitBtn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

#submitBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

#submitBtn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    padding: 12px 24px;
    background: #f0f0f0;
    color: #333;
    width: 100%;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    padding: 12px 24px;
    background: #dc3545;
    color: white;
    width: 100%;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* Messages */
.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

.message.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

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

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Audio Status Grid */
.audio-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.status-item {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.status-item.ready {
    background: #d4edda;
    border-color: #34c759;
    color: #155724;
}

.status-item.pending {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
    animation: pulse 2s infinite;
}

.status-item.not-ready {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.status-item-name {
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: capitalize;
}

.status-item-indicator {
    font-size: 24px;
    margin-bottom: 8px;
}

.status-item-text {
    font-size: 12px;
    font-weight: 500;
}

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

/* News List */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-item {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.3s;
}

.news-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.news-item h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 18px;
}

.news-item-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.news-item p {
    color: #666;
    font-size: 14px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.news-item audio {
    width: 100%;
    margin: 12px 0;
    height: 32px;
}

.news-item-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
}

.btn-edit {
    background: #007aff;
    color: white;
}

.btn-edit:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

.modal-small {
    max-width: 400px;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 15px;
}

.modal-header h2 {
    margin: 0;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.modal-buttons .btn-secondary {
    width: auto;
}

/* Scrollbar styling */
.news-section::-webkit-scrollbar {
    width: 8px;
}

.news-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.news-section::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.news-section::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}
