/**
 * Modern Movie Booking System - Main Stylesheet
 * Professional, responsive design with smooth animations
 */

/* ==================== CSS Variables ==================== */
:root {
    /* Primary Colors - Purple to Blue Gradient */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    
    /* Neutral Colors */
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --gray-light: #cbd5e1;
    --gray-lighter: #f1f5f9;
    --white: #ffffff;
    
    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== Base Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background-color: var(--primary);
    color: var(--white);
}

/* ==================== Typography ==================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--gray);
}

/* ==================== Navbar ==================== */
.navbar-modern {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-base);
}

.navbar-modern.scrolled {
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.98);
}

.navbar-brand-modern {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.nav-link-modern {
    color: var(--dark) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all var(--transition-base);
    transform: translateX(-50%);
}

.nav-link-modern:hover::after,
.nav-link-modern.active::after {
    width: 80%;
}

.nav-link-modern:hover {
    color: var(--primary) !important;
}

.btn-nav-primary {
    background: var(--gradient-primary);
    color: var(--white) !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: var(--radius-full);
    font-weight: 600;
    border: none;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.btn-nav-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ==================== Hero Section ==================== */
.hero-section {
    background: var(--gradient-primary);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,101.3C1248,85,1344,75,1392,69.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--white);
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--white);
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

/* ==================== Cards ==================== */
.card-modern {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-base);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-modern:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.card-modern-header {
    padding: 1.5rem;
    background: var(--gradient-primary);
    color: var(--white);
}

.card-modern-body {
    padding: 1.5rem;
}

.card-modern-footer {
    padding: 1rem 1.5rem;
    background: var(--gray-lighter);
    border-top: 1px solid var(--gray-light);
}

/* Movie Card */
.movie-card-modern {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    cursor: pointer;
}

.movie-card-modern:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-2xl);
}

.movie-poster {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.movie-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 2;
}

.movie-rating {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--gradient-success);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 2;
}

.movie-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform var(--transition-base);
}

.movie-card-modern:hover .movie-overlay {
    transform: translateY(0);
}

.movie-info {
    padding: 1.5rem;
}

.movie-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.movie-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.movie-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--gray);
    font-size: 0.875rem;
}

.movie-meta-item i {
    color: var(--primary);
}

.movie-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.genre-tag {
    background: var(--gray-lighter);
    color: var(--gray);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

/* ==================== Buttons ==================== */
.btn-modern {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 1rem;
}

.btn-primary-modern {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.btn-secondary-modern {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary-modern:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-success-modern {
    background: var(--gradient-success);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-success-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.btn-lg-modern {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    border-radius: var(--radius-lg);
}

.btn-block-modern {
    width: 100%;
    display: flex;
}

/* ==================== Form Elements ==================== */
.form-control-modern {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all var(--transition-fast);
    background: var(--white);
}

.form-control-modern:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-label-modern {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-group-modern {
    margin-bottom: 1.5rem;
}

.input-icon {
    position: relative;
}

.input-icon input {
    padding-left: 3rem;
}

.input-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

/* ==================== Search & Filter ==================== */
.search-bar-modern {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin: -3rem auto 2rem;
    position: relative;
    z-index: 10;
}

.search-input-modern {
    display: flex;
    align-items: center;
    background: var(--gray-lighter);
    border-radius: var(--radius-full);
    padding: 0.5rem 1rem;
    border: 2px solid transparent;
    transition: all var(--transition-fast);
}

.search-input-modern:focus-within {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.search-input-modern input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem;
    font-size: 1rem;
    outline: none;
}

.filter-chips {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.filter-chip {
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    background: var(--white);
    border: 2px solid var(--gray-light);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 500;
    color: var(--gray);
}

.filter-chip:hover,
.filter-chip.active {
    background: var(--gradient-primary);
    color: var(--white);
    border-color: transparent;
    transform: translateY(-2px);
}

/* ==================== Loading States ==================== */
.spinner-modern {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(90deg, var(--gray-lighter) 25%, var(--gray-light) 50%, var(--gray-lighter) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==================== Badges & Tags ==================== */
.badge-modern {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary { background: var(--gradient-primary); color: var(--white); }
.badge-success { background: var(--gradient-success); color: var(--white); }
.badge-warning { background: var(--warning); color: var(--white); }
.badge-error { background: var(--error); color: var(--white); }
.badge-info { background: var(--info); color: var(--white); }

/* ==================== Alerts ==================== */
.alert-modern {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success { background: rgba(16, 185, 129, 0.1); border-color: var(--success); color: var(--success); }
.alert-error { background: rgba(239, 68, 68, 0.1); border-color: var(--error); color: var(--error); }
.alert-warning { background: rgba(245, 158, 11, 0.1); border-color: var(--warning); color: var(--warning); }
.alert-info { background: rgba(59, 130, 246, 0.1); border-color: var(--info); color: var(--info); }

/* ==================== Modal ==================== */
.modal-modern .modal-content {
    border: none;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
}

.modal-modern .modal-header {
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    border: none;
}

.modal-modern .modal-footer {
    border: none;
    background: var(--gray-lighter);
}

/* ==================== Footer ==================== */
.footer-modern {
    background: var(--gradient-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--white);
}

/* ==================== Animations ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fadeIn { animation: fadeIn 0.5s ease-out; }
.animate-slideUp { animation: slideUp 0.6s ease-out; }
.animate-slideDown { animation: slideDown 0.6s ease-out; }
.animate-scaleIn { animation: scaleIn 0.4s ease-out; }

/* ==================== Utilities ==================== */
.container-modern {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-center { text-align: center; }
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }

.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ==================== Responsive Design ==================== */
@media (max-width: 1024px) {
    .grid-cols-4 { grid-template-columns: repeat(3, 1fr); }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
}

@media (max-width: 768px) {
    .grid-cols-3, .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .hero-title { font-size: 2.5rem; }
    .movie-poster { height: 300px; }
}

@media (max-width: 640px) {
    .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; }
    .hero-title { font-size: 2rem; }
    .search-bar-modern { margin: -2rem 1rem 1rem; }
}
