:root {
    --max-width: 1200px;
    --primary-bg: #0f0f0f;
    --secondary-bg: #1f1f1f;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
}

body {
    margin: 0;
    padding: 0;
    background: var(--primary-bg);
    color: var(--text-primary);
    font-family: 'YouTube Sans', Arial, sans-serif;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px;
}

/* Channel Header Styles */
.channel-banner {
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.channel-info {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--secondary-bg);
    margin-bottom: 20px;
}

.channel-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-right: 20px;
}

.channel-details {
    flex-grow: 1;
}

.channel-name {
    font-size: 25px;
    margin-bottom: 5px;
}

.channel-stats {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 10px;
}

.channel-description {
	color:#aaa;
	font-size: 0.9rem;
}

.subscribe-button {
    background: #cc0000;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}

.section-title {
    font-size: 22px;
    color: #fff;
    margin: 0 0 15px;
}

/* Shorts Grid Styles */
.shorts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.short-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 9/16;
    background: var(--secondary-bg);
    transition: transform 0.2s;
}

.short-card:hover {
    transform: scale(1.02);
}

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

.video-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 15px;
}

.video-title {   
	margin: 0;
    font-weight: normal;
    font-size: 14px;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-stats {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 12px;
}

.video-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

.eye-icon {
    width: 16px;
    height: 16px;
    opacity: 0.8;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 78vh;
    margin: 100px auto;
}

.close-btn {
    position: absolute;
    top: -30px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 1001;
}

/* Loading Styles */
.loading {
    text-align: center;
    padding: 20px;
    display: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--secondary-bg);
    border-top: 4px solid #cc0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.loading-text {
    color: var(--text-secondary);
    margin-top: 10px;
    font-size: 14px;
}

.thumbnail-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.thumbnail-wrapper.loaded {
    opacity: 1;
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.short-card:hover .thumbnail-overlay {
    opacity: 1;
}

.video-container {
    position: relative;
    padding-bottom: 177.77%; /* 16:9 aspect ratio for vertical video */
    height: 0;
    overflow: hidden;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Styles */
@media (max-width: 768px) {
	
	.container {
    padding: 10px;
	}
	
	.channel-banner {
    height: 70px;
    display:none;
	}
	
    .shorts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2px;
        padding: 0;
    }

    .channel-info {
        flex-direction: column;
        text-align: center;.
        padding: 5px 0 20px 0;
    }

    .channel-avatar {
        margin-right: 0;
    }

    .subscribe-button {
        margin-top: 15px;
    }
    
    .video-title {
    -webkit-line-clamp: 1;
	}

    .video-info {
    padding: 8px;
	}
	
	.modal-content {
    margin: 30px auto;
    }
}