/* --- Global Bar Theme --- */
body { 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    background-color: #0f0f0f; 
    color: #e0e0e0; 
    margin: 0; 
    padding: 20px; 
}

.container { 
    max-width: 1200px; 
    margin: 20px auto; 
    background: #1a1a1a; 
    padding: 20px; 
    border-radius: 12px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
}

/* --- LOGIN SCREEN --- */
.login-wrapper {
    display: flex;
    max-width: 900px;
    margin: 60px auto;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    border: 1px solid #333;
    min-height: 450px;
}

.login-image { flex: 1; min-width: 50%; }
.login-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(40%) brightness(60%);
    display: block;
}

.login-box {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.login-box input {
    width: 100%;
    max-width: 250px;
    padding: 12px;
    margin-bottom: 15px;
    background: #000;
    border: 1px solid #d4af37;
    color: white;
    border-radius: 4px;
    text-align: center;
}

/* --- TABLE WRAPPER --- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 20px;
}

table { 
    width: 100%; 
    min-width: 850px; 
    border-collapse: collapse; 
    margin-bottom: 30px;
}

/* --- HEADERS --- */
h1, h2 { color: #d4af37; text-transform: uppercase; letter-spacing: 2px; }
h1 { text-align: center; border-bottom: 2px solid #d4af37; padding-bottom: 15px; }
h2 { margin-top: 40px; font-size: 1.1em; border-left: 4px solid #d4af37; padding-left: 15px; background: linear-gradient(90deg, #222, transparent); padding-block: 8px; }

/* --- TOOLBAR --- */
.toolbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: #222; 
    padding: 15px; 
    border-radius: 8px; 
    flex-wrap: wrap;
    gap: 15px;
}

.search-form { display: flex; gap: 5px; flex-grow: 1; }
.search-form input { padding: 10px; background: #000; color: white; border: 1px solid #444; border-radius: 4px; flex-grow: 1; max-width: 300px; }

.sort-buttons { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sort-buttons span { color: #888; font-size: 0.8em; }

/* --- TABLE CELLS --- */
th { text-align: left; color: #666; font-size: 0.75em; text-transform: uppercase; padding: 12px 10px; border-bottom: 2px solid #333; }
td { padding: 15px 10px; border-bottom: 1px solid #252525; vertical-align: middle; }

/* CENTER ALIGN RATING & STATUS COLUMNS */
th:nth-child(2), td:nth-child(2),
th:nth-child(6), td:nth-child(6) {
    text-align: center;
}

/* --- CONTENT STYLING --- */
.details-stack { text-align: left; }
.brand { color: #d4af37; font-size: 0.75em; font-weight: bold; text-transform: uppercase; display: block; }
.name { font-size: 1.1em; color: #fff; font-weight: 500; display: block; }
.volume { color: #666; font-size: 0.8em; }

.meter-bg { background: #333; width: 100%; height: 6px; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.meter-fill { height: 100%; transition: 0.5s; }
.abv-fill { background: #5a6b83; } 
.remainder-fill { background: #d4af37; } 
.meter-text { font-size: 0.75em; font-weight: bold; }

.status-dot { height: 10px; width: 10px; border-radius: 50%; display: inline-block; }
.dot-green { background-color: #4caf50; box-shadow: 0 0 5px #4caf50; }
.dot-red { background-color: #f44336; }

/* --- VOTING DISPLAY --- */
.star-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.star-rating {
    color: #d4af37;
    font-weight: bold;
    cursor: pointer;
    background: #222;
    padding: 5px 12px;
    border-radius: 20px;
    display: inline-block;
    border: 1px solid #333;
    transition: 0.2s;
}

.star-rating:hover { border-color: #d4af37; transform: scale(1.05); }

.vote-label {
    font-size: 0.65em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

/* --- MODAL POP-UP --- */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    background-color: #1a1a1a;
    margin: 15% auto;
    padding: 30px;
    border: 1px solid #d4af37;
    width: 300px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.2);
}

.star-options { display: flex; flex-direction: row-reverse; justify-content: center; margin: 15px 0; }
.star-options span {
    font-size: 2.5em; color: #333; cursor: pointer; transition: 0.2s;
}
.star-options span:hover, .star-options span:hover ~ span { color: #d4af37; }

/* --- BUTTONS --- */
.btn, .btn-small, .btn-del { cursor: pointer; border-radius: 4px; font-weight: bold; text-transform: uppercase; transition: 0.2s; }
.btn { background: #d4af37; color: #000; border: none; padding: 12px 25px; }
.btn-small { background: #2a2a2a; color: #d4af37; border: 1px solid #d4af37; padding: 6px 12px; font-size: 0.75em; text-decoration: none; }
.btn-del { background: transparent; color: #944; border: 1px solid #522; padding: 6px 10px; font-size: 0.75em; }
.btn-del:hover { background: #522; color: #fff; }

.badge-admin { background: #d4af37; color: #000; padding: 2px 8px; font-size: 0.4em; border-radius: 3px; margin-left: 10px; vertical-align: middle; }

/* --- ADMIN EDIT --- */
.edit-row { background-color: #222 !important; }
.edit-form { display: flex; flex-wrap: wrap; gap: 10px; padding: 15px; }
.edit-form input, .edit-form select { background: #000; border: 1px solid #444; color: #fff; padding: 8px; border-radius: 4px; }

/* --- MOBILE --- */
@media (max-width: 768px) {
    body { padding: 10px; }
    .login-wrapper { flex-direction: column; min-height: auto; }
    .login-image { height: 200px; min-width: 100%; }
    .toolbar { flex-direction: column; align-items: stretch; }
    h1 { font-size: 1.4em; }
    
    /* Ensure tables can still scroll on small screens */
    table { min-width: 700px; }
}