/* =========================================
   1. Global Styles
   ========================================= */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    width: 100%;
    max-width: 1200px;
    margin: 1.5rem auto 2.5rem auto;
    flex: 1;
    padding: 0 1rem;
}

.small {
    font-size: 0.85rem;
    color: #666;
}

/* =========================================
   2. Header & Navigation
   ========================================= */
header {
    background: #222;
    color: white;
    padding: 0.6rem 1.2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

header h1 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: bold;
}

header h1 a {
    color: white;
    text-decoration: none;
}

.main-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.main-nav a {
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: #444;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.main-nav a:hover {
    background: #666;
}

.main-nav a.logout-btn {
    background-color: #d9534f;
}

.main-nav a.logout-btn:hover {
    background-color: #c9302c;
}

/* =========================================
   3. Login / Signup Styles
   ========================================= */
.title-box {
    border: 3px solid black;
    background-color: white;
    padding: 10px 40px;
    display: inline-block;
    margin-bottom: 30px;
    font-weight: bold;
    font-size: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.auth-card {
    width: 100%;
    max-width: 700px;
    border: 2px solid black;
    border-radius: 0;
    overflow: hidden;
    background-color: #E5E5E5;
}

.auth-tab {
    cursor: pointer;
    padding: 20px 0;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    border-bottom: 2px solid black;
}

.tab-active {
    background-color: #E5E5E5;
    color: black;
}

.tab-inactive {
    background-color: #D1D1D1;
    color: #555;
}

.custom-input {
    background-color: #F0F0F0 !important;
    border: none !important;
    border-radius: 5px;
    padding: 12px;
    margin-bottom: 15px;
}

.form-label {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.btn-custom {
    background-color: #D1D1D1;
    border: none;
    color: black;
    font-size: 1.2rem;
    padding: 10px 40px;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-custom:hover {
    background-color: #bbb;
    color: black;
}

/* =========================================
   4. Movie Grid & Cards
   ========================================= */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
}

.movie-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff;
    overflow: hidden;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.movie-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.movie-card img {
    width: 100%;
    display: block;
}

.movie-card .placeholder {
    height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    color: #777;
    font-size: 0.85rem;
}

.movie-card .info {
    padding: 0.45rem 0.6rem 0.6rem 0.6rem;
}

.movie-card h3 {
    margin: 0 0 0.2rem 0;
    font-size: 0.95rem;
}

.movie-card .meta {
    font-size: 0.8rem;
    margin: 0.1rem 0;
    color: #555;
}

/* =========================================
   5. Movie Details
   ========================================= */
.movie-detail-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.movie-detail-layout img {
    width: 100%;
    border-radius: 8px;
}

.movie-detail-layout .placeholder {
    height: 390px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    color: #777;
}

.movie-detail-layout .info p {
    margin: 0.35rem 0;
}

/* =========================================
   6. Responsive Design
   ========================================= */
@media (max-width: 720px) {
    .movie-detail-layout {
        grid-template-columns: 1fr;
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* -------------------------------------------------- */
/* Flash messages (success / error notifications)  */
/* -------------------------------------------------- */

/* Flash message container */
.flash-container {
    margin-bottom: 1rem;
}

/* Base flash style */
.flash {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

/* Success (Green) */
.flash-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

/* Error (Red) */
.flash-error,
.flash-danger {   /* support both 'error' and 'danger' */
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* Warning (Yellow) */
.flash-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}