:root {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --primary-color: #2ecc71;
    --secondary-color: #27ae60;
    --hover-dark: #2c2c2c;
    --border-color: #404040;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 0 40px 0;
    box-sizing: border-box;
}



.container {
    max-width: 1200px;
    width: 95%;
    background: #2c2c2c;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    padding: 2rem;
    margin: 2rem auto;
    box-sizing: border-box;
}

th:nth-child(1) { width: 5%; }
th:nth-child(2) { width: 15%; }
th:nth-child(3) { width: 10%; }
th:nth-child(4) { width: 20%; }
th:nth-child(5) { width: 40%; }

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

input[type="text"], 
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 0.8rem;
    background: #404040;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

input[type="text"]:focus, 
input[type="url"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

textarea {
    height: 120px;
    resize: vertical;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    grid-column: 1 / -1;
    justify-content: center;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white;
    background: var(--primary-color);
    text-align: center;
    display: inline-block;
    user-select: none;
    box-sizing: border-box;
}

.btn:hover {
    background: var(--secondary-color);
}

.btn.reset {
    background: #7f8c8d;
}

.btn.reset:hover {
    background: #95a5a6;
}

.records-btn, .back-btn {
    max-width: 300px;
    background: #3498db;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 1rem;
    border-radius: 8px;
    display: block;
    text-align: center;
    text-decoration: none;
    user-select: none;
    box-sizing: border-box;
}

.back-btn {
    margin: 0 auto;
    margin-bottom: 15px; 
}

.records-btn:hover, .back-btn:hover {
    background: #2980b9;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    white-space: nowrap;
}

th {
    background: #404040;
    color: var(--primary-color);
}

tr:hover {
    background: var(--hover-dark);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-width: 250px;
}

.btn.edit {
    background: #f39c12;
}

.btn.edit:hover {
    background: #d68910;
}

.btn.delete {
    background: #e74c3c;
}

.btn.delete:hover {
    background: #c0392b;
}

.btn.view {
    background: #27ae60;
}

.btn.view:hover {
    background: #219150;
}

.btn.preview {
    background: #9b59b6;
}

.btn.preview:hover {
    background: #8e44ad;
}

#videoContainer {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    position: relative;
}

#videoContainer iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    background: #2c2c2c;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
}

@media (max-width: 1024px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .container {
        padding: 1rem;
    }
    th, td {
        padding: 0.6rem;
    }
}

@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
    }
    
    .action-buttons {
        flex-wrap: wrap;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
}