:root {
    --primary-color: #1a73e8;
    --success-color: #0f9d58;
    --warning-color: #f4b400;
    --error-color: #db4437;
    --text-color: #202124;
    --bg-color: #f8f9fa;
    --border-color: #dadce0;
    --youtube-red: #ff0000;
    --kick-green: #53fc18;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
}

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

/* Header */
header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

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

header h1 {
    font-size: 1.5rem;
    font-weight: 500;
}

header h1 a {
    color: var(--text-color);
    text-decoration: none;
}

header nav a {
    margin-left: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
}

header nav a:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    margin-bottom: 1rem;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert-success {
    background: #e6f4ea;
    border-color: var(--success-color);
    color: #137333;
}

.alert-error {
    background: #fce8e6;
    border-color: var(--error-color);
    color: #c5221f;
}

.alert-warning {
    background: #fef7e0;
    border-color: var(--warning-color);
    color: #ea8600;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.btn:hover {
    background: #1557b0;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

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

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

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

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Auth */
.auth-container {
    max-width: 400px;
    margin: 3rem auto;
}

.auth-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.auth-card h2 {
    margin-bottom: 1.5rem;
}

.help-text {
    margin-top: 1rem;
    font-size: 13px;
    color: #5f6368;
}

.help-text code {
    background: var(--bg-color);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 12px;
}

/* Admin Dashboard */
.admin-dashboard {
    background: white;
    padding: 2rem;
    border-radius: 8px;
}

.status-section,
.channels-section {
    margin-bottom: 2.5rem;
}

.add-channel-form {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 2rem;
}

.add-channel-form h4 {
    margin-bottom: 1rem;
}

/* Tables */
.channels-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.channels-table th,
.channels-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.channels-table th {
    background: var(--bg-color);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    color: #5f6368;
}

.channels-table code {
    background: var(--bg-color);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 12px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.badge-youtube {
    background: var(--youtube-red);
    color: white;
}

.badge-kick {
    background: var(--kick-green);
    color: #000;
}

.badge-success {
    background: var(--success-color);
    color: white;
}

.badge-inactive {
    background: #9aa0a6;
    color: white;
}

/* Public Pages */
.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: #5f6368;
}

.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.channel-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

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

.channel-icon {
    margin-bottom: 1rem;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 18px;
}

.platform-badge.youtube {
    background: var(--youtube-red);
    color: white;
}

.platform-badge.kick {
    background: var(--kick-green);
    color: black;
}

.channel-card h4 a {
    color: var(--text-color);
    text-decoration: none;
}

.channel-card h4 a:hover {
    color: var(--primary-color);
}

.channel-platform {
    color: #5f6368;
    font-size: 14px;
}

/* Videos Grid */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.video-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

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

.video-link {
    text-decoration: none;
    color: inherit;
}

.video-thumbnail {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    background: #000;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: #202124;
}

.video-info {
    padding: 12px;
}

.video-info h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-channel {
    font-size: 12px;
    color: #606060;
    margin-bottom: 4px;
}

.video-meta {
    font-size: 12px;
    color: #909090;
}

.video-meta span {
    margin-right: 4px;
}

/* Watch Page */
.watch-page {
    max-width: 1024px;
    margin: 0 auto;
}

.video-player {
    position: relative;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-details {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
}

.video-details h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.video-stats {
    font-size: 14px;
    color: #606060;
    margin-bottom: 1rem;
}

.channel-info {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

.channel-info h3 a {
    color: var(--text-color);
    text-decoration: none;
}

.channel-info h3 a:hover {
    color: var(--primary-color);
}

.empty-state {
    text-align: center;
    padding: 3rem 0;
    color: #5f6368;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    color: #5f6368;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    header .container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    header nav {
        margin-top: 1rem;
    }
    
    header nav a {
        margin-left: 0;
        margin-right: 1.5rem;
    }
}
