/* 
 * Toduma Movie Stylesheet
 * Netflix-inspired layout with #75af36 as primary color
 */

:root {
    --primary-color: #75af36;
    --primary-color-hover: #5e8d2b;
    --bg-color: #141414;
    --text-color: #ffffff;
    --text-muted: #e5e5e5;
    --text-dark: #b3b3b3;
    --nav-bg: rgba(20, 20, 20, 0.95);
    --card-bg: #2f2f2f;
    --danger-color: #e50914;
    /* Keeping typical danger red for reference */
    --modal-bg: #141414;
    --input-bg: #333333;

    --font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s;
    border: none;
    text-align: center;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-color-hover);
}

.btn-secondary {
    background-color: rgba(109, 109, 110, 0.7);
    color: white;
}

.btn-secondary:hover {
    background-color: rgba(109, 109, 110, 0.4);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.5rem;
    border-radius: 6px;
}

/* --- HOME PAGE HERO SECTION --- */
.home-page {
    /* Prevent scroll on home page if desired, or let it scroll */
    overflow: hidden;
}

.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
    /* A cinematic dark placeholder image */
    background-image: url('https://images.unsplash.com/photo-1536440136628-849c177e76a1?q=80&w=2025&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient fade for the Netflix look */
    background: linear-gradient(to top, rgba(20, 20, 20, 1) 0%, rgba(20, 20, 20, 0.3) 50%, rgba(20, 20, 20, 0.8) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-content .logo {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: -1px;
}

.hero-content .slogan {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.hero-content .sub-slogan {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Responsive Home Page */
@media (max-width: 768px) {
    .hero-content .logo {
        font-size: 3rem;
    }

    .hero-content .slogan {
        font-size: 2rem;
    }

    .hero-content .sub-slogan {
        font-size: 1.2rem;
    }

    .btn-large {
        padding: 0.8rem 1.5rem;
        font-size: 1.2rem;
        width: 100%;
    }

    .action-buttons {
        gap: 1rem;
    }

    .home-page {
        overflow: auto;
    }
}

/* --- HEADER NAVIGATION --- */
.main-header {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--nav-bg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-small {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 2rem;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
    flex-grow: 1;
}

.main-nav a {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1rem;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text-color);
}

.user-profile img {
    height: 35px;
    border-radius: 4px;
    cursor: pointer;
}

/* --- CATALOG PAGE --- */
.catalog-content {
    padding: 2rem;
    flex-grow: 1;
}

.catalog-header h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

/* Filters */
.catalog-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--text-dark);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
}

.filter-group.text-search {
    flex-grow: 1;
    min-width: 200px;
}

.filter-group i {
    color: var(--text-dark);
    margin: 0 0.5rem;
}

.filter-input {
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 0.5rem;
    outline: none;
    width: 100%;
}

.filter-input::placeholder {
    color: var(--text-dark);
}

.select-input {
    cursor: pointer;
    appearance: none;
    padding-right: 1.5rem;
}

.select-input option {
    background-color: var(--input-bg);
    color: var(--text-color);
}

.filter-group:has(button) {
    border: none;
    background: transparent;
    padding: 0;
}

/* Grid */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
}

/* Movie Card */
.movie-card {
    background-color: var(--card-bg);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
}

.card-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, transparent 30%);
}

.card-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 3px;
}

.card-badge.series {
    background-color: #e50914;
}

.card-duration {
    font-size: 0.8rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

.card-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.card-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.card-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem;
    font-size: 0.9rem;
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
}

/* Responsive Header / Catalog */
@media (max-width: 768px) {
    .main-header {
        padding: 1rem;
    }

    .catalog-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
}

/* --- DETAILS PAGE --- */
.details-hero {
    position: relative;
    width: 100%;
    min-height: 70vh;
    display: flex;
    align-items: flex-end;
    padding: 3rem;
}

.details-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1542204165-65bf26472b9b?q=80&w=2000&auto=format&fit=crop');
    background-size: cover;
    background-position: top center;
    z-index: -2;
}

.details-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(20, 20, 20, 1) 0%, rgba(20, 20, 20, 0.6) 50%, transparent 100%),
        linear-gradient(to top, rgba(20, 20, 20, 1) 0%, transparent 40%);
    z-index: -1;
}

.details-info-container {
    max-width: 600px;
    z-index: 1;
}

.details-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.details-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.match-score {
    color: #46d369;
}

.badge {
    border: 1px solid var(--text-dark);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9rem;
}

.details-synopsis {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.details-cast {
    color: var(--text-dark);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.details-cast p {
    margin-bottom: 0.5rem;
}

.details-cast strong {
    color: var(--text-color);
}

.details-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-whatsapp-main {
    background-color: #25D366;
    color: white;
}

.btn-whatsapp-main:hover {
    background-color: #128C7E;
}

.social-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-dark);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transition: background-color 0.2s ease, transform 0.2s;
}

.share-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.share-btn.whatsapp-share:hover {
    background-color: #25D366;
}

.share-btn.facebook:hover {
    background-color: #1877F2;
}

.share-btn.twitter:hover {
    background-color: #1DA1F2;
}

/* Related Content */
.related-section {
    padding: 2rem 3rem;
}

.related-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background-color: var(--modal-bg);
    border-radius: 8px;
    width: 100%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    overflow: hidden;
}

.modal-header {
    background-color: #1a1a1a;
    padding: 1.5rem;
    border-bottom: 1px solid #333;
}

.modal-header h2 {
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.modal-subtitle {
    color: var(--text-dark);
    font-size: 0.9rem;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--text-dark);
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: white;
}

.modal-body {
    padding: 1.5rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.modal-input {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--input-bg);
    border: 1px solid #444;
    border-radius: 4px;
    color: white;
    font-size: 1rem;
}

.modal-input:focus {
    outline: 2px solid var(--primary-color);
    border-color: transparent;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.payment-radio {
    display: flex;
    align-items: center;
    background-color: var(--input-bg);
    padding: 1rem;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #444;
    transition: border-color 0.2s;
}

.payment-radio:has(input:checked) {
    border-color: var(--primary-color);
    background-color: rgba(117, 175, 54, 0.1);
}

.payment-radio input {
    margin-right: 1rem;
    accent-color: var(--primary-color);
    width: 1.2rem;
    height: 1.2rem;
}

.btn-full {
    width: 100%;
}

.text-center {
    text-align: center;
}

/* Timer styles */
.timer-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.timer-instruction {
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* Success styles */
.success-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.success-body h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.success-message {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.support-box {
    background-color: #2a2a2a;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.support-number {
    font-size: 1.3rem;
    font-weight: bold;
    color: #25D366;
    margin-top: 0.5rem;
}

/* Details Responsive */
@media (max-width: 768px) {
    .details-hero {
        padding: 2rem 1rem;
    }

    .details-title {
        font-size: 2.5rem;
    }

    .details-synopsis {
        font-size: 1rem;
    }

    .details-actions {
        flex-direction: column;
    }

    .btn-large {
        width: 100%;
    }

    .related-section {
        padding: 2rem 1rem;
    }
}