/* StreamWorks - Video Hosting Platform */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700&display=swap');

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

body {
    font-family: "Raleway", sans-serif;
    background: linear-gradient(#7b4397, #dc2430);
    color: rgba(0, 0, 0, 0.8);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

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

/* Header - Top Bar */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
}

header .container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.logo a {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo a::before {
    content: "▶";
    color: #7b4397;
    font-size: 24px;
}

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

nav a {
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

nav a:hover {
    background-color: rgba(123, 67, 151, 0.1);
    color: #7b4397;
}

/* Mobile Menu Toggle Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
    z-index: 101;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Main Content */
main {
    margin-top: 70px;
    padding: 32px 0;
    min-height: calc(100vh - 70px);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 100px 0 30px;
    color: #fff;
}

.hero h1 {
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 20px;
    font-weight: 400;
    opacity: 0.95;
}

/* Videos Grid */
.videos-grid {
    margin: 20px 0 40px 0;
}

.videos-grid h2 {
    margin-bottom: 24px;
    color: #fff;
    font-size: 28px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

.video-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.video-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background-color: #000;
    overflow: hidden;
}

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

.placeholder-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7b4397, #6a3486);
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
}

.duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #fff;
    font-weight: 600;
}

.video-info {
    padding: 16px;
}

.video-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.video-info .channel {
    color: #666;
    font-size: 14px;
    margin-bottom: 4px;
    font-weight: 500;
}

.video-info .views {
    color: #999;
    font-size: 13px;
}

/* Video Player Page */
.video-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px 20px;
    margin-top: 24px;
}

.video-player {
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.video-player video {
    width: 100%;
    display: block;
}

.video-details {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.video-details h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333;
}

.video-meta {
    display: flex;
    gap: 20px;
    color: #666;
    margin-bottom: 16px;
    font-size: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.channel-info {
    margin-bottom: 16px;
    font-size: 15px;
    color: #333;
}

.channel-info strong {
    color: #7b4397;
    font-weight: 600;
}

.description {
    margin-top: 16px;
}

.description h3 {
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.description p {
    color: #666;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Comments Section */
.comments-section {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.comments-section h2 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.comment-form {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    background-color: #fff;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: #333;
    font-family: "Raleway", sans-serif;
    font-size: 15px;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #7b4397;
    box-shadow: 0 0 0 3px rgba(123, 67, 151, 0.1);
}

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

.comment {
    background-color: #f5f5f5;
    padding: 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.comment:hover {
    background-color: #eeeeee;
    transform: translateX(4px);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-header strong {
    color: #7b4397;
    font-weight: 600;
    font-size: 15px;
}

.comment-date {
    color: #999;
    font-size: 13px;
}

.comment-body {
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Auth Pages */
.auth-container {
    max-width: 400px;
    margin: 100px auto 40px auto;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.auth-container h2 {
    margin-bottom: 24px;
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    color: #333;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background-color: #fff;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: #333;
    font-family: "Raleway", sans-serif;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #7b4397;
    box-shadow: 0 0 0 3px rgba(123, 67, 151, 0.1);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #999;
    font-size: 13px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #7b4397, #6a3486);
    color: #ffffff;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(123, 67, 151, 0.4);
    background: linear-gradient(135deg, #6a3486, #5a2d75);
}

.btn-primary:active {
    transform: translateY(0);
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.auth-link a {
    color: #7b4397;
    text-decoration: none;
    font-weight: 600;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Upload Page */
.upload-container {
    max-width: 600px;
    margin: 100px auto 40px auto;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.upload-container h2 {
    margin-bottom: 24px;
    font-size: 28px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* Upload Progress Bar */
#uploadProgress {
    margin: 24px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

#progressPercent {
    color: #6a3486;
    font-weight: 600;
}

.progress-bar-container {
    width: 100%;
    height: 24px;
    background-color: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6a3486, #7a4496);
    border-radius: 12px;
    transition: width 0.3s ease;
    width: 0%;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

#progressDetails {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* Profile Page */
.profile-container {
    margin: 100px 0 40px 0;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-container h2 {
    margin-bottom: 24px;
    font-size: 28px;
    font-weight: 600;
    color: #333;
}

.profile-info {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.profile-info h3 {
    font-size: 20px;
    font-weight: 500;
    color: #333;
}

.my-videos h3 {
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 600;
    color: #333;
}

/* Messages */
.error-message {
    background-color: rgba(220, 36, 48, 0.1);
    color: #dc2430;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid rgba(220, 36, 48, 0.3);
    font-weight: 500;
}

.success-message {
    background-color: rgba(0, 153, 76, 0.1);
    color: rgb(0, 153, 76);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid rgba(0, 153, 76, 0.3);
    font-weight: 500;
}

.no-videos {
    text-align: center;
    color: #fff;
    padding: 60px 20px;
    grid-column: 1 / -1;
    font-size: 18px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

/* Footer */
footer {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 24px 0;
    margin-top: 60px;
    text-align: center;
    color: #fff;
    backdrop-filter: blur(10px);
}

footer .container {
    padding: 0 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    /* Mobile Menu Styles */
    .menu-toggle {
        display: flex;
    }
    
    nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background-color: rgba(255, 255, 255, 1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        z-index: 99;
    }
    
    nav.active {
        max-height: 300px;
        padding: 16px 0;
    }
    
    nav a {
        padding: 12px 24px;
        border-radius: 0;
        display: block;
        text-align: left;
        font-size: 15px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    nav a:last-child {
        border-bottom: none;
    }
    
    nav a:hover {
        background-color: rgba(123, 67, 151, 0.1);
        color: #7b4397;
    }
    
    header {
        height: 60px;
        padding: 0 16px;
    }
    
    main {
        margin-top: 60px;
        padding: 20px 0;
    }
    
    .video-container {
        padding: 40px 16px 20px 16px;
        margin-top: 16px;
    }
    
    .video-player {
        margin-top: 24px;
    }
    
    .auth-container {
        margin: 80px 20px 20px 20px;
        padding: 24px;
    }
    
    .upload-container {
        margin: 20px;
        padding: 24px;
    }
}

/* Features Section */
.features-section {
    margin: 60px 0;
    padding: 40px 20px;
}

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

.feature-card {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    border-color: #7b4397;
}

.feature-icon {
    font-size: 64px;
    margin-bottom: 16px;
    line-height: 1;
}

.feature-card h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 24px;
}

.feature-btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #7b4397, #6a3486);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(123, 67, 151, 0.3);
}

.feature-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(123, 67, 151, 0.4);
    background: linear-gradient(135deg, #6a3486, #5a2d75);
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-card {
        padding: 24px;
    }
    
    .feature-icon {
        font-size: 48px;
    }
}
