/* --- Variables & Global Reset --- */
:root {
    --netflix-red: #e50914;
    --dark-bg: #121212;
    --card-bg: #1f1f1f;
    --section-border: #333;
    --text-main: #eeeeee;
    --text-muted: #bbbbbb;
}

body { 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    background: var(--dark-bg); 
    color: var(--text-main); 
    margin: 0; 
    padding: 0; 
    line-height: 1.6;
}

.container { 
    width: 100%;
    max-width: 1200px; 
    margin: auto; 
    padding: 20px; 
    box-sizing: border-box;
}

/* --- Page Sectioning (The "Boxed" Look) --- */
.page-section {
    background: #1a1a1a;
    border: 1px solid var(--section-border);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.section-title {
    font-size: 1.4em;
    color: var(--netflix-red);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Header & Search --- */
header { 
    background: #000; 
    padding: 15px 0; 
    border-bottom: 3px solid var(--netflix-red); 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
}
.header-content { display: flex; justify-content: space-between; align-items: center; }

#movieSearch { 
    width: 100%; 
    max-width: 500px; 
    padding: 12px 20px; 
    margin: 0 auto;
    display: block; 
    background: #222; 
    border: 1px solid #444; 
    color: white; 
    border-radius: 30px;
    outline: none;
    transition: 0.3s;
}
#movieSearch:focus { border-color: var(--netflix-red); box-shadow: 0 0 10px rgba(229, 9, 20, 0.3); }

/* --- Dashboard Layout --- */
.dashboard-layout { display: flex; gap: 30px; }
aside { flex: 1; }
main { flex: 3; }

/* --- Movie Grid & Cards --- */
.movie-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); 
    gap: 20px; 
}
.movie-card { 
    background: var(--card-bg); 
    border-radius: 8px; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    transition: 0.3s ease;
    border: 1px solid #333;
}
.movie-card:hover { transform: translateY(-5px); border-color: var(--netflix-red); }
.movie-card img { width: 100%; height: 320px; object-fit: cover; }
.movie-info { padding: 15px; flex-grow: 1; }

/* --- Buttons --- */
.rent-btn { 
    display: block; 
    width: 100%; 
    padding: 12px; 
    background: var(--netflix-red); 
    color: white; 
    text-align: center; 
    text-decoration: none; 
    border-radius: 6px; 
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}
.rent-btn:hover { background: #b20710; }
.rent-btn.disabled { background: #444; cursor: not-allowed; opacity: 0.6; }

/* --- Mobile Money Selector (Zambian UI - CSS Only) --- */
.payment-container { max-width: 500px; margin: 20px auto; }
.total-display { display: flex; justify-content: space-between; margin-bottom: 20px; font-size: 1.2em; }
.price-tag { color: var(--netflix-red); font-weight: bold; }

.network-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 20px; }
.network-option input { display: none; }
.network-card { 
    border: 2px solid #333; border-radius: 8px; padding: 20px; 
    text-align: center; cursor: pointer; background: #222; transition: 0.3s; 
}
.network-card span { font-size: 1em; font-weight: bold; letter-spacing: 1px; }

/* CSS Branded Dots (Replaces Images) */
.network-brand { display: flex; align-items: center; justify-content: center; gap: 10px; }
.dot { height: 12px; width: 12px; border-radius: 50%; display: inline-block; }
.airtel-dot { background-color: #ff0000; box-shadow: 0 0 8px #ff0000; }
.mtn-dot { background-color: #ffcc00; box-shadow: 0 0 8px #ffcc00; }

.network-option input:checked + .airtel { border-color: #ff0000; background: rgba(255, 0, 0, 0.1); }
.network-option input:checked + .airtel span { color: #ff0000; }
.network-option input:checked + .mtn { border-color: #ffcc00; background: rgba(255, 204, 0, 0.1); }
.network-option input:checked + .mtn span { color: #ffcc00; }

.input-group { margin-bottom: 20px; }
.input-group label { display: block; margin-bottom: 8px; color: var(--text-muted); }
.input-group input { 
    width: 100%; padding: 12px; background: #111; border: 1px solid #444; 
    color: white; border-radius: 5px; box-sizing: border-box; 
}

/* --- Responsive Table (Mobile Optimized) --- */
.checkout-table { width: 100%; border-collapse: collapse; }
.checkout-table th { background: #252525; padding: 12px; text-align: left; color: var(--text-muted); }
.checkout-table td { padding: 15px; border-bottom: 1px solid #333; }

@media (max-width: 900px) {
    .dashboard-layout { flex-direction: column; }
}

@media (max-width: 600px) {
    .checkout-table, .checkout-table thead, .checkout-table tbody, .checkout-table th, .checkout-table td, .checkout-table tr { 
        display: block; width: 100%; 
    }
    .checkout-table thead { display: none; }
    .checkout-table tr { margin-bottom: 15px; background: #252525; border-radius: 8px; padding: 10px; border: 1px solid #333; }
    .checkout-table td { text-align: right; padding-left: 50%; position: relative; border: none; }
    .checkout-table td:before {
        content: attr(data-label); position: absolute; left: 15px; font-weight: bold; color: var(--netflix-red);
    }
}

/* --- Modals --- */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); }
.modal-content { background: #1a1a1a; margin: 10% auto; padding: 20px; border-radius: 10px; width: 90%; max-width: 800px; position: relative; }
.close-modal { position: absolute; top: 10px; right: 20px; font-size: 30px; color: white; cursor: pointer; }

/* --- Toast Notification --- */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #28a745; /* Success Green */
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 9999;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    font-weight: bold;
}

#toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein { from {bottom: 0; opacity: 0;} to {bottom: 30px; opacity: 1;} }
@keyframes fadeout { from {bottom: 30px; opacity: 1;} to {bottom: 0; opacity: 0;} }

/* --- Active Vault Item Distinction --- */
.mini-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03); /* Subtle dark lift */
    border: 1px solid #333;               /* The clear border you requested */
    border-left: 3px solid var(--netflix-red); /* Red accent on the side */
    border-radius: 6px;
    transition: 0.2s;
}

.mini-item:hover {
    border-color: var(--netflix-red);      /* Glow effect on hover */
    background: rgba(255, 255, 255, 0.05);
}

.mini-item strong {
    font-size: 0.95em;
    color: #fff;
}

.return-link {
    color: #888;
    text-decoration: none;
    font-size: 0.8em;
    padding: 5px 10px;
    border: 1px solid #444;
    border-radius: 4px;
}

.return-link:hover {
    background: #e50914;
    color: white;
    border-color: #e50914;
}