:root {
    --primary: #ff6600;
    --primary-dark: #cc5200;
    --secondary: #ff0000;
    --secondary-dark: #cc0000;
    --dark: #ffffff;
    --dark-secondary: #f5f5f5;
    --gray: #e0e0e0;
    --gray-light: #666666;
    --white: #ffffff;
    --black: #000000;
    --border: #e0e0e0;
    --radius: 12px;
    --transition: 0.2s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark);
    color: var(--black);
    line-height: 1.6;
    min-height: 100vh;
}

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

a {
    color: inherit;
    text-decoration: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-block {
    width: 100%;
}

.btn-large {
    padding: 14px 32px;
    font-size: 16px;
}

.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.username {
    color: var(--gray-light);
    font-size: 14px;
}

.main {
    min-height: calc(100vh - 120px);
    padding: 20px 0;
}

.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius);
    margin-bottom: 40px;
    color: var(--white);
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 24px;
}

.videos-section h2 {
    margin-bottom: 24px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.video-card {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--gray);
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--white);
    background: var(--gray);
}

.video-info {
    padding: 12px;
    background: var(--white);
}

.video-info h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--black);
}

.video-meta {
    font-size: 13px;
    color: var(--gray-light);
    display: flex;
    gap: 12px;
}

.no-videos {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--gray-light);
}

.video-player-container {
    max-width: 900px;
    margin: 0 auto;
}

.video-player {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius);
}

.video-details {
    padding: 20px 0;
}

.video-details h1 {
    font-size: 24px;
    margin-bottom: 12px;
}

.video-stats {
    display: flex;
    gap: 16px;
    color: var(--gray-light);
    font-size: 14px;
    margin-bottom: 16px;
}

.video-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.video-description {
    padding: 16px;
    background: var(--dark-secondary);
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.video-description h3 {
    margin-bottom: 8px;
    font-size: 16px;
}

.video-owner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--dark-secondary);
    border-radius: var(--radius);
}

.owner-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    overflow: hidden;
}

.owner-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.owner-info h4 {
    margin-bottom: 4px;
}

.owner-info p {
    font-size: 14px;
    color: var(--gray-light);
}

.comments-section {
    margin-top: 32px;
}

.comments-section h3 {
    margin-bottom: 20px;
}

.comment-form {
    margin-bottom: 24px;
}

.comment-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--black);
    font-family: inherit;
    resize: vertical;
    margin-bottom: 12px;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.login-prompt {
    color: var(--gray-light);
    margin-bottom: 24px;
}

.login-prompt a {
    color: var(--primary);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment {
    display: flex;
    gap: 12px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-header span {
    font-size: 12px;
    color: var(--gray-light);
}

.no-comments {
    color: var(--gray-light);
    text-align: center;
    padding: 20px;
}

.auth-page {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.1);
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 24px;
}

.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--black);
    font-size: 14px;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.auth-link {
    text-align: center;
    margin-top: 16px;
    color: var(--gray-light);
}

.auth-link a {
    color: var(--primary);
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: rgba(0, 200, 0, 0.1);
    color: #00cc00;
    border: 1px solid #00cc00;
}

.alert-error {
    background: rgba(255, 0, 0, 0.1);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.upload-page {
    max-width: 600px;
    margin: 0 auto;
}

.upload-page h1 {
    margin-bottom: 24px;
}

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

.upload-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.upload-form input,
.upload-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--black);
    font-size: 14px;
    font-family: inherit;
}

.upload-form input:focus,
.upload-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.help-text {
    font-size: 12px;
    color: var(--gray-light);
    margin-top: 8px;
}

.footer {
    background: var(--dark-secondary);
    border-top: 1px solid var(--border);
    padding: 20px 0;
    text-align: center;
    color: var(--gray-light);
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .header .container {
        flex-wrap: wrap;
    }
}
