/* StreamFlix - Cinematic Streaming Platform Styles */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #e50914;
    --primary-dark: #b20710;
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --bg-hover: #1f1f1f;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent-gold: #ffd700;
    --shadow-1: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-2: 0 8px 40px rgba(229, 9, 20, 0.3);
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.flash {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease;
    min-width: 300px;
    box-shadow: var(--shadow-1);
}

.flash-success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4caf50;
    color: #4caf50;
}

.flash-error {
    background: rgba(229, 9, 20, 0.2);
    border: 1px solid var(--primary);
    color: var(--primary);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: 
        radial-gradient(circle at 20% 80%, rgba(229, 9, 20, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(229, 9, 20, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a0a 0%, #1a0a0a 100%);
    padding: 2rem;
}

.auth-card {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(229, 9, 20, 0.2);
    border-radius: 12px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-1), var(--shadow-2);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3.5rem;
    color: var(--primary);
    text-align: center;
    letter-spacing: 4px;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 30px rgba(229, 9, 20, 0.5);
}

.auth-card h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

.subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-card input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
}

.auth-card input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

.auth-card button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    font-family: 'Outfit', sans-serif;
}

.auth-card button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(229, 9, 20, 0.4);
}

.auth-switch {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-switch a:hover {
    color: var(--text-primary);
}

/* Subscription Page */
.subscription-container {
    min-height: 100vh;
    padding: 4rem 2rem;
    background: 
        radial-gradient(circle at 50% 0%, rgba(229, 9, 20, 0.1) 0%, transparent 50%),
        var(--bg-dark);
}

.subscription-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.subscription-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.plan-card {
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.plan-card:hover::before,
.plan-card.selected::before {
    opacity: 1;
}

.plan-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: var(--shadow-2);
}

.plan-card.selected {
    border-color: var(--primary);
    background: rgba(229, 9, 20, 0.05);
}

.plan-card.creator {
    border-color: var(--accent-gold);
}

.plan-card.creator::before {
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

.badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-gold);
    color: var(--bg-dark);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.plan-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin: 2rem 0;
}

.price .amount {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary);
}

.price .interval {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

.save-badge {
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: -1rem;
}

.plan-card ul {
    list-style: none;
    text-align: left;
}

.plan-card ul li {
    padding: 0.75rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.subscribe-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 2rem;
    font-family: 'Outfit', sans-serif;
}

.subscribe-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(229, 9, 20, 0.4);
}

.payment-note {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Profiles Page */
.profiles-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.5s ease;
}

.profiles-container h1 {
    text-align: center;
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: 3rem;
    letter-spacing: 2px;
}

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 180px));
    gap: 3rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.profile-card {
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
}

.profile-avatar {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-hover));
    border: 3px solid transparent;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.profile-card:hover .profile-avatar {
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.4);
}

.profile-card p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.profile-card:hover p {
    color: var(--text-primary);
}

.add-profile .profile-avatar {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.add-profile:hover .profile-avatar {
    border-color: var(--primary);
    border-style: solid;
}

.manage-profiles-link {
    margin-top: 2rem;
}

.manage-profiles-link a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.manage-profiles-link a:hover {
    color: var(--text-primary);
    border-color: var(--primary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal-content {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--text-primary);
}

.modal-content h2 {
    margin-bottom: 1.5rem;
}

.modal-content input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 1.5rem;
}

.avatar-selector {
    margin-bottom: 1.5rem;
}

.avatar-selector p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.avatar-grid label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar-grid label:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.avatar-grid input {
    display: none;
}

.avatar-grid input:checked + label {
    background: rgba(229, 9, 20, 0.2);
    border: 2px solid var(--primary);
}

.modal-content button {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.modal-content button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Browse Page */
.browse-container {
    min-height: 100vh;
}

.browse-header {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.9) 0%, transparent 100%);
    z-index: 100;
    transition: background 0.3s ease;
}

.browse-header.scrolled {
    background: var(--bg-dark);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.header-left .logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--primary);
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(229, 9, 20, 0.5);
    margin: 0;
}

.header-left nav {
    display: flex;
    gap: 2rem;
}

.header-left nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.header-left nav a:hover,
.header-left nav a.active {
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    width: 200px;
    font-family: 'Outfit', sans-serif;
}

.search-box input:focus {
    outline: none;
}

.user-menu {
    position: relative;
}

.profile-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.5rem;
}

.profile-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.5);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 1rem);
    right: 0;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    min-width: 200px;
    overflow: hidden;
    box-shadow: var(--shadow-1);
}

.dropdown-menu a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.3s ease;
}

.dropdown-menu a:hover {
    background: var(--bg-hover);
}

/* Hero Banner */
.hero-banner {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: flex-end;
    padding: 4rem;
    background-size: cover;
    background-position: center;
    margin-top: 5rem;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    line-height: 1.1;
}

.hero-description {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.btn-play,
.btn-info {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
    text-decoration: none;
}

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

.btn-play:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(229, 9, 20, 0.4);
}

.btn-info {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-info:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Content Rows */
.content-rows {
    padding: 2rem 4rem 4rem;
}

.content-row {
    margin-bottom: 3rem;
}

.content-row h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
}

.movie-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.movie-card {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    aspect-ratio: 16/9;
}

.movie-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.movie-card:hover {
    transform: scale(1.05);
    z-index: 10;
}

.movie-card:hover img {
    transform: scale(1.1);
}

.movie-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    padding: 1.5rem 1rem 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-card:hover .movie-overlay {
    opacity: 1;
}

.movie-overlay h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.movie-overlay p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Movie Modal */
.movie-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.modal-content-large {
    background: var(--bg-card);
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

.modal-hero {
    position: relative;
    height: 500px;
}

.modal-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-actions {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    display: flex;
    gap: 1rem;
}

.btn-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 1.2rem;
}

.btn-icon:hover {
    background: white;
    color: var(--bg-dark);
    transform: scale(1.1);
}

.btn-icon.liked {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.modal-info {
    padding: 2rem;
}

.modal-info h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.movie-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.movie-meta span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.match {
    color: #46d369 !important;
    font-weight: 700;
}

.modal-info > p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.movie-details {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

.movie-details p {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.movie-details strong {
    color: var(--text-primary);
    margin-right: 0.5rem;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-1);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(229, 9, 20, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .browse-header {
        padding: 1rem 2rem;
        flex-direction: column;
        gap: 1rem;
    }

    .header-left {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .header-left nav {
        gap: 1rem;
        font-size: 0.85rem;
        width: 100%;
        justify-content: center;
    }

    .hero-banner {
        height: 60vh;
        padding: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .content-rows {
        padding: 1rem 2rem 2rem;
    }

    .movie-row {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .profiles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .profile-avatar {
        width: 120px;
        height: 120px;
        font-size: 3rem;
    }

    .subscription-content h1 {
        font-size: 2rem;
    }

    .plans-grid {
        grid-template-columns: 1fr;
    }
}
