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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #2c3e50;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logout-btn {
    padding: 0.5rem 1rem;
    background-color: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background-color: #c0392b;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    min-height: calc(100vh - 100px);
}

.sidebar {
    background-color: white;
    border-radius: 4px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.sidebar-header h2 {
    font-size: 1.1rem;
}

.folder-tree {
    font-size: 0.95rem;
}

.folder-item {
    cursor: pointer;
    padding: 0.5rem;
    margin: 0.25rem 0;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.folder-item:hover {
    background-color: #ecf0f1;
}

.folder-item.selected {
    background-color: #3498db;
    color: white;
}

.folder-toggle {
    width: 1.5rem;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.folder-children {
    margin-left: 1rem;
}

.folder-children.collapsed {
    display: none;
}

.content {
    background-color: white;
    border-radius: 4px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ecf0f1;
}

.breadcrumb {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.actions {
    display: flex;
    gap: 0.5rem;
}

.videos-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.placeholder {
    grid-column: 1 / -1;
    text-align: center;
    color: #95a5a6;
    padding: 3rem;
}

.video-card {
    border: 1px solid #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    background-color: #fafafa;
    transition: box-shadow 0.2s;
}

.video-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.video-card-header {
    padding: 1rem;
    border-bottom: 1px solid #ecf0f1;
    background-color: white;
}

.video-card-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    word-break: break-word;
}

.video-card-meta {
    font-size: 0.85rem;
    color: #7f8c8d;
    line-height: 1.4;
}

.video-card-actions {
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-small {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-copy {
    background-color: #27ae60;
    color: white;
    flex-grow: 1;
}

.btn-copy:hover {
    background-color: #229954;
}

.btn-copy.copied {
    background-color: #16a085;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 90%;
}

.modal-content h2 {
    margin-bottom: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.error-message {
    padding: 0.75rem;
    background-color: #fadbd8;
    border: 1px solid #e74c3c;
    border-radius: 3px;
    color: #c0392b;
    margin-bottom: 1rem;
}

.success-message {
    padding: 0.75rem;
    background-color: #d5f4e6;
    border: 1px solid #27ae60;
    border-radius: 3px;
    color: #229954;
    margin-bottom: 1rem;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
}

.login-card {
    background-color: white;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 300px;
    width: 100%;
}

.login-card h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
    
    .videos-container {
        grid-template-columns: 1fr;
    }
}
