/* Aether Stream - Main Stylesheet for Login Page */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&family=Lato:wght@400;700&display=swap');

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

body {
    font-family: 'Lato', sans-serif;
    background-color: #121212;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* overflow: hidden; was here */
    position: relative;
}

/* Background Effect */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://www.publicdomainpictures.net/pictures/470000/velka/abstract-blue-energy-background.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    filter: blur(8px);
    z-index: -1;
}

.login-container {
    background-color: rgba(26, 26, 26, 0.85);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    width: 90%;
    max-width: 400px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #007AFF;
    letter-spacing: 2px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Simple logo icon using CSS */
.logo::before {
    content: 'A';
    display: inline-block;
    background-color: #007AFF;
    color: #1A1A1A;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 10px;
    font-weight: 600;
}

.login-container h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 22px;
    margin-bottom: 20px;
}

.message {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: bold;
}

.message.error {
    background-color: #5d1a1a;
    color: #ffc4c4;
    border: 1px solid #a33;
}

.message.success {
    background-color: #1a5d2d;
    color: #c4ffe1;
    border: 1px solid #3a3;
}

.input-field {
    width: 100%;
    padding: 14px 20px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 25px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-field:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 15px rgba(0, 122, 255, 0.5);
}

.submit-btn {
    width: 100%;
    padding: 14px 20px;
    background: #007AFF;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

.submit-btn:hover {
    background: #0056b3;
}
.submit-btn:active {
    transform: scale(0.98);
}

.help-link {
    margin-top: 20px;
    font-size: 14px;
}

.help-link a {
    color: #007AFF;
    text-decoration: none;
    transition: color 0.3s;
}

.help-link a:hover {
    color: #4da6ff;
}

/* ==================================== */
/* Homepage Styles                      */
/* ==================================== */

.main-container {
    display: flex;
    width: 100%;
    height: 100vh;
    background-color: #121212;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background-color: #000;
    padding: 20px;
    display: flex;
    flex-direction: column;
    color: #fff;
}

.sidebar-logo {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #007AFF;
    text-align: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #222;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1; /* Pushes footer to the bottom */
}

.nav-item {
    color: #aaa;
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s;
    font-weight: bold;
}

.nav-item:hover {
    background-color: #222;
    color: #fff;
}
.nav-item.active {
    background-color: #007AFF;
    color: #fff;
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid #222;
}
.logout-btn {
    display: block;
    text-align: center;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.3s;
}
.logout-btn:hover {
    background-color: #555;
}


/* Main Content */
.main-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 40px;
}
.main-content::-webkit-scrollbar { width: 8px; }
.main-content::-webkit-scrollbar-track { background: #121212; }
.main-content::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
.main-content::-webkit-scrollbar-thumb:hover { background: #555; }


/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.search-bar input {
    background-color: #222;
    border: 1px solid #333;
    border-radius: 20px;
    padding: 8px 15px;
    color: #fff;
    width: 300px;
}
.user-profile {
    font-weight: bold;
    color: #007AFF;
}

/* Hero Section */
.hero-section {
    height: 400px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-position: center 25%; /* Move the image focus up */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px;
    margin-bottom: 40px;
    position: relative;
}
.hero-content {
    max-width: 50%;
}
.hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}
/* Generic Button Style for ALL buttons */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    font-family: 'Poppins', sans-serif; /* Ensure font matches */
    font-size: 14px; /* Ensure font size is consistent */
}

.btn:hover {
    transform: scale(1.05);
}

/* Specific style ONLY for buttons inside the hero section */
.hero-buttons .btn {
    margin-right: 15px;
}
.btn.btn-primary { background-color: #007AFF; color: #fff; }
.btn.btn-secondary { background-color: rgba(100,100,100,0.7); color: #fff; }

/* Anime Rows */
.anime-row {
    margin-bottom: 40px;
}
.row-title {
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    margin-bottom: 15px;
}
.row-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.anime-card {
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    transition: transform 0.3s, box-shadow 0.3s;
}
.anime-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 122, 255, 0.2);
}

.anime-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}
.card-title {
    padding: 10px;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==================================== */
/* Watch Page Styles                    */
/* ==================================== */

.back-link {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
}

.watch-area {
    margin-bottom: 40px;
}

.video-player-container {
    width: 100%;
    background-color: #000;
    border-radius: 12px;
    margin-bottom: 20px;
    min-height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.video-placeholder {
    text-align: center;
    color: #555;
}
.video-placeholder h3 {
    font-size: 24px;
    margin-bottom: 10px;
}
video {
    width: 100%;
    border-radius: 12px;
}

.series-info {
    padding: 10px 0;
}
.series-title {
    font-family: 'Poppins', sans-serif;
    font-size: 36px;
    margin-bottom: 10px;
}
.series-description {
    color: #aaa;
    max-width: 80%;
    line-height: 1.6;
    margin-bottom: 10px;
}
.series-meta {
    color: #888;
}

.episode-list-area {
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 12px;
}

.episode-list-title {
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.episode-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}
.episode-list::-webkit-scrollbar { width: 8px; }
.episode-list::-webkit-scrollbar-track { background: #1a1a1a; }
.episode-list::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }
.episode-list::-webkit-scrollbar-thumb:hover { background: #666; }

.episode-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: #222;
    border-radius: 8px;
    text-decoration: none;
    color: #ccc;
    transition: background-color 0.3s;
    border-left: 4px solid transparent;
}
.episode-item:hover {
    background-color: #333;
    color: #fff;
}
.episode-item.active {
    border-left-color: #007AFF;
    background-color: #2a3a5c;
    color: #fff;
}
.episode-number {
    font-weight: bold;
    color: #007AFF;
}
.episode-title {
    font-weight: 500;
}

/* ==================================== */
/* Search Bar & Results Styles          */
/* ==================================== */

.search-bar {
    display: flex;
    background-color: #222;
    border: 1px solid #333;
    border-radius: 20px;
    overflow: hidden; /* To keep the button inside the rounded corners */
}

.search-bar input {
    background: none;
    border: none;
    padding: 8px 15px;
    color: #fff;
    width: 300px;
    font-size: 14px;
}
.search-bar input:focus {
    outline: none;
}

.search-bar button {
    background-color: #007AFF;
    border: none;
    color: #fff;
    padding: 0 15px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}
.search-bar button:hover {
    background-color: #0056b3;
}

.no-results {
    color: #aaa;
    font-size: 18px;
    padding: 40px 0;
    text-align: center;
}

/* ==================================== */
/* Responsive Design (Media Queries)    */
/* ==================================== */

/* For Tablets and smaller screens (e.g., up to 1024px) */
@media (max-width: 1024px) {
    .sidebar {
        width: 200px; /* Make sidebar a bit smaller */
    }
    .main-content {
        padding: 20px;
    }
    .hero-title {
        font-size: 36px;
    }
    .row-content {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}


/* For Mobile Phones (e.g., up to 768px) */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column; /* Stack sidebar and main content vertically */
        height: auto;
    }

    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: row; /* Make nav items horizontal */
        justify-content: space-around;
        align-items: center;
        padding: 10px;
        border-bottom: 1px solid #222;
    }
    .sidebar-logo {
        display: none; /* Hide logo on mobile to save space */
    }
    .sidebar-nav {
        flex-direction: row; /* Horizontal navigation */
        flex-grow: 0;
        gap: 5px;
    }
    .nav-item {
        padding: 8px 12px;
        font-size: 14px;
    }
    .sidebar-footer {
        border-top: none;
        padding-top: 0;
    }

    .main-header {
        flex-direction: column;
        gap: 15px;
    }

    .hero-section {
        height: 300px;
        padding: 20px;
    }
    .hero-content {
        max-width: 100%;
        text-align: center;
    }
    .hero-title {
        font-size: 28px;
    }

    .row-content {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        gap: 15px;
    }
    .anime-card img {
        height: 200px;
    }
    
    /* Watch Page Responsive */
    .series-info {
        padding: 0;
    }
    .series-title {
        font-size: 28px;
    }
    .series-description {
        max-width: 100%;
        font-size: 14px;
    }
    .video-player-container {
        min-height: 250px; /* Adjust video player height for mobile */
    }
}

/* ==================================== */
/* Registration Page & Form Styles      */
/* ==================================== */
.form-footer-link {
    margin-top: 20px;
    font-size: 14px;
}

.form-footer-link a {
    color: #007AFF;
    text-decoration: none;
    font-weight: bold;
}
.form-footer-link a:hover {
    text-decoration: underline;
}

/* Make error messages display nicely */
.message.error p {
    margin: 0;
    padding: 2px 0;
}

/* Style for the green success message box */
.message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}
.message.success p {
    margin: 0;
}

/* ==================================== */
/* Browse Page Styles                   */
/* ==================================== */

.browse-grid {
    display: grid;
    /* Use the same grid system as the homepage for consistency */
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

/* Responsive adjustments for the browse grid */
@media (max-width: 1024px) {
    .browse-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (max-width: 768px) {
    .browse-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* ==================================== */
/* Settings Page Styles                 */
/* ==================================== */
.settings-form-container {
    background-color: #1a1a1a;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px; /* Limit form width */
}
.settings-form-container h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}
.settings-form-container .form-group {
    margin-bottom: 20px;
}
.settings-form-container label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #ccc;
}
.settings-form-container input[type="password"] {
    width: 100%;
    padding: 12px;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
    box-sizing: border-box;
}

/* ==================================== */
/* Language Switcher Styles             */
/* ==================================== */
.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.language-switcher a {
    color: #888;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.language-switcher a:hover {
    color: #fff;
}

.language-switcher a.active {
    color: #007AFF;
}

/* ==================================== */
/* Hero Section Description Style       */
/* ==================================== */
.hero-description {
    color: #e0e0e0;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
    max-width: 60%; /* Limit the width of the description */
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.9);
}

/* Responsive adjustment for the description */
@media (max-width: 768px) {
    .hero-description {
        max-width: 100%; /* Full width on mobile */
        font-size: 14px;
        margin-bottom: 20px;
    }
}

/* ==================================== */
/* Pagination Styles                    */
/* ==================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    gap: 8px;
}
.pagination a {
    color: #ccc;
    text-decoration: none;
    padding: 8px 15px;
    border: 1px solid #333;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
    font-weight: bold;
}
.pagination a:hover {
    background-color: #007AFF;
    color: #fff;
    border-color: #007AFF;
}
.pagination a.active {
    background-color: #007AFF;
    color: #fff;
    border-color: #007AFF;
    cursor: default;
}

/* ==================================== */
/* Comment Section Styles               */
/* ==================================== */
.comment-section {
    background-color: #1a1a1a;
    padding: 20px 30px;
    border-radius: 12px;
    margin-top: 40px;
}
.comment-section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}
.comment-form-container textarea {
    width: 100%;
    background-color: #222;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    font-size: 14px;
    min-height: 80px;
    margin-bottom: 10px;
    resize: vertical;
}
.comment-form-container button {
    float: right;
}
.comment-list {
    margin-top: 50px; /* To clear the floated button */
}
.comment-item {
    border-bottom: 1px solid #333;
    padding: 20px 0;
}
.comment-item:last-child {
    border-bottom: none;
}
.comment-author {
    font-weight: bold;
    color: #007AFF;
    margin-bottom: 5px;
}
.comment-date {
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
}
.comment-body p {
    color: #ccc;
    line-height: 1.6;
}

/* ==================================== */
/* Genre Tag Styles                     */
/* ==================================== */
.genre-tags {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    vertical-align: middle;
}
.genre-tag {
    display: inline-block;
    background-color: #333;
    color: #ccc;
    padding: 4px 10px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.3s;
}
.genre-tag:hover {
    background-color: #007AFF;
    color: #fff;
}

/* ==================================== */
/* Profile Page Styles                  */
/* ==================================== */
.profile-card {
    background-color: #1a1a1a;
    padding: 25px 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    border: 1px solid #2a2a2a;
}
.profile-details {
    list-style: none;
    padding: 0;
    margin: 0;
}
.profile-details li {
    font-size: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #333;
    color: #fff;
    display: flex;
}
.profile-details li:last-child {
    border-bottom: none;
}
.profile-details strong {
    color: #888;
    width: 120px;
    display: inline-block;
    flex-shrink: 0;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.view-all-link {
    color: #888;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}
.view-all-link:hover {
    color: #007AFF;
}

/* === 1. Gradient Accents === */

/* For Primary Buttons like "Watch Now" and "Get VIP" */
.btn.btn-primary, .submit-btn {
    background: linear-gradient(45deg, #007AFF, #5856D6);
    transition: all 0.3s ease;
}

.btn.btn-primary:hover, .submit-btn:hover {
    background: linear-gradient(45deg, #006ae0, #4d4ac4);
    box-shadow: 0 0 15px rgba(88, 86, 214, 0.5);
}

/* For the active navigation item in the sidebar */
.nav-item.active {
    background: linear-gradient(90deg, #007AFF, #5856D6);
}

/* === 2. Glassmorphism Sidebar === */

.sidebar {
    /* Make the background semi-transparent */
    background-color: rgba(0, 0, 0, 0.5);
    
    /* Add the frosted glass effect */
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    
    /* Add a subtle border */
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* === 3. Glow Effects === */

/* Make anime cards glow on hover */
.anime-card:hover {
    transform: translateY(-10px) scale(1.03); /* Add a little zoom */
    box-shadow: 0 0 25px rgba(0, 122, 255, 0.6); /* This is the main glow effect */
}

/* Make the Hero Section title glow */
.hero-title {
    text-shadow: 0 0 15px rgba(0, 122, 255, 0.7), 0 0 5px rgba(255, 255, 255, 0.5);
}

/* === 4. Enhanced Card Hover === */

.anime-card {
    position: relative; /* Needed for the overlay */
}

.anime-card img {
    transition: filter 0.3s ease;
}

/* The title will now be an overlay */
.anime-card .card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 20px 10px 10px 10px;
    
    /* Hide it by default */
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

/* When hovering over the card, show the title and darken the image */
.anime-card:hover img {
    filter: brightness(0.7);
}

.anime-card:hover .card-title {
    opacity: 1;
    transform: translateY(0);
}

/* Notification Styles */
.notification-bell {
    position: relative;
    font-size: 20px;
    color: #ccc;
    cursor: pointer;
    margin-right: 15px;
}
.notification-bell:hover {
    color: #fff;
}
.notification-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: #e74c3c;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
}
.notification-dropdown {
    position: absolute;
    top: 50px;
    right: 20px;
    width: 350px;
    background-color: #2c2c2c;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    display: none; /* Hidden by default */
}
.notification-item {
    padding: 15px;
    border-bottom: 1px solid #444;
    color: #ccc;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s;
}
.notification-item:hover {
    background-color: #3a3a3a;
}
.notification-item:last-child {
    border-bottom: none;
}
.notification-item small {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}
.no-notifications {
    padding: 20px;
    text-align: center;
    color: #888;
}