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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    background: #fff;
}

a { color: inherit; }

/* ===== Navbar ===== */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #667eea;
    font-size: 20px;
}

.logo h1 { color: white; font-size: 24px; font-weight: 600; }

.nav-links { display: flex; gap: 30px; list-style: none; }

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-links a:hover { opacity: 0.8; }

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 5% 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.hero h2 { font-size: 48px; margin-bottom: 20px; font-weight: 700; }
.hero p { font-size: 20px; margin-bottom: 30px; opacity: 0.95; }

.cta-button {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.cta-button:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }

/* ===== Features ===== */
.features { padding: 80px 5%; background: #f8f9fa; }
.section-title { text-align: center; font-size: 36px; margin-bottom: 50px; color: #333; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.15); }

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
}

.feature-card h3 { font-size: 22px; margin-bottom: 15px; color: #333; }
.feature-card p { color: #666; line-height: 1.8; }

/* ===== Video gallery (public) ===== */
.video-section { padding: 80px 5%; background: white; }

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.video-card {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    transition: transform 0.3s, box-shadow 0.3s;
}
.video-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.15); }

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}
.video-thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; }

.thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.85);
    font-size: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
    background: rgba(0,0,0,0);
    opacity: 0;
    transition: opacity 0.25s, background 0.25s;
}
.video-card:hover .play-overlay { opacity: 1; background: rgba(0,0,0,0.25); }

.video-info { padding: 14px 16px 18px; }
.video-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.video-meta { font-size: 13px; color: #777; }
.muted { color: #888; }

/* ===== Watch page ===== */
.watch-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    max-width: 1300px;
    margin: 30px auto;
    padding: 0 5%;
}

.video-player-wrap {
    width: 100%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}
.video-player { width: 100%; max-height: 70vh; display: block; }
.video-player.youtube-frame { width: 100%; aspect-ratio: 16/9; max-height: none; height: auto; border: none; }

.or-divider { text-align: center; color: #aaa; font-size: 13px; margin: 16px 0; font-weight: 600; }

.badge-youtube {
    display: inline-block;
    background: #ff0000;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.watch-title { font-size: 24px; margin: 18px 0 8px; }
.watch-meta { color: #777; font-size: 14px; margin-bottom: 16px; }
.watch-description {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 10px;
    font-size: 15px;
    color: #444;
}

.watch-sidebar h3 { font-size: 18px; margin-bottom: 16px; }
.sidebar-video {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    margin-bottom: 14px;
}
.sidebar-thumb {
    width: 140px;
    min-width: 140px;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.sidebar-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-video-title { font-size: 14px; font-weight: 600; line-height: 1.3; }
.sidebar-video-meta { font-size: 12px; color: #888; margin-top: 4px; }

@media (max-width: 900px) {
    .watch-layout { grid-template-columns: 1fr; }
}

/* ===== Clients ===== */
.clients { padding: 80px 5%; background: white; }

.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.client-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}
.client-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.12); }

.client-logo {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    padding: 15px;
}
.client-logo img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.3s; }
.client-logo a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.client-logo a:hover img { transform: scale(1.1); }
.client-logo-text { font-size: 36px; font-weight: bold; color: #667eea; }
.client-card h4 { font-size: 18px; color: #333; font-weight: 600; }

/* ===== Footer ===== */
.footer { background: #2d3748; color: white; padding: 40px 5%; text-align: center; }
.footer-content { max-width: 1200px; margin: 0 auto; }
.company-name { font-size: 24px; font-weight: 600; margin-bottom: 10px; }
.footer p { opacity: 0.8; margin-bottom: 20px; }
.footer a { color: white; }

/* ===== Auth pages (login / setup) ===== */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
}
.auth-logo { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 10px; }
.auth-logo h1 { color: #333; font-size: 22px; }
.auth-title { text-align: center; margin-bottom: 20px; color: #444; font-size: 20px; }
.auth-sub { text-align: center; color: #777; font-size: 14px; margin-bottom: 20px; }
.auth-back { display: block; text-align: center; margin-top: 18px; color: #667eea; text-decoration: none; font-size: 14px; }

/* ===== Forms (shared) ===== */
form label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; color: #444; }
form input[type="text"],
form input[type="password"],
form input[type="file"],
form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
}
form textarea { resize: vertical; }

.btn-primary {
    margin-top: 20px;
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.9; }

.btn-ghost {
    color: white;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.4);
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
}
.btn-small { padding: 6px 14px; font-size: 13px; border-radius: 6px; border: none; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-danger { background: #e53e3e; color: white; }
.btn-danger:hover { background: #c53030; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fed7d7; color: #822727; }
.alert-success { background: #c6f6d5; color: #22543d; }

/* ===== Admin dashboard ===== */
.admin-body { background: #f4f5f7; min-height: 100vh; }

.admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-header-right { display: flex; align-items: center; gap: 14px; color: white; font-size: 14px; }

.admin-main { max-width: 900px; margin: 30px auto; padding: 0 20px 60px; }

.admin-panel {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.06);
}
.admin-panel h2 { margin-bottom: 10px; font-size: 20px; color: #333; }

.admin-form { max-width: 600px; }

.admin-video-list { display: flex; flex-direction: column; gap: 18px; margin-top: 16px; }
.admin-video-row {
    display: flex;
    gap: 16px;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 14px;
}
.admin-video-thumb {
    width: 140px;
    min-width: 140px;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.admin-video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-video-details { flex: 1; }
.inline-edit-form .edit-title { font-weight: 600; margin-bottom: 8px; }
.inline-edit-form .edit-desc { font-size: 13px; margin-bottom: 8px; }
.admin-video-meta { font-size: 12px; color: #888; margin-bottom: 8px; }
.admin-video-actions { display: flex; gap: 8px; margin-bottom: 8px; }

@media (max-width: 768px) {
    .hero h2 { font-size: 32px; }
    .hero p { font-size: 16px; }
    .nav-links { display: none; }
    .feature-grid, .client-grid { grid-template-columns: 1fr; }
    .admin-video-row { flex-direction: column; }
    .admin-video-thumb { width: 100%; }
}
