body { 
    font-family: 'Copperplate', Copperplate, 'Copperplate Gothic Light', serif; 
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 20px; 
    background-color: black; 
    color: #4B5563; 
    font-size: 1rem; /* Mobile-friendly base size */
}

/* Wider layout for PC screens */
@media (min-width: 1024px) {
    body {
        max-width: 1600px;
        padding: 30px;
        font-size: 1.2rem;
    }
    
    .page {
        max-width: 100%;
        padding: 30px;
    }
    
    .wishlist-table {
        font-size: 0.9em;
    }
}

/* Admin Purple Theme */
body.admin-theme {
    background: linear-gradient(135deg, #4a148c 0%, #6a1b9a 50%, #8e24aa 100%);
    background-attachment: fixed;
}

body.admin-theme .nav-bar {
    background: linear-gradient(135deg, #6a1b9a 0%, #8e24aa 100%);
    border: 2px solid #ce93d8;
}

body.admin-theme .nav-button {
    background: linear-gradient(135deg, #9c27b0 0%, #ba68c8 100%) !important;
    border: 2px solid #ce93d8 !important;
}

body.admin-theme .nav-button:hover {
    background: linear-gradient(135deg, #ba68c8 0%, #9c27b0 100%) !important;
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.6) !important;
}

body.admin-theme .page {
    background: rgba(74, 20, 140, 0.9);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #ce93d8;
}

body.admin-theme table {
    background: rgba(106, 27, 154, 0.8);
    border: 1px solid #ce93d8;
}

body.admin-theme th {
    background: rgba(156, 39, 176, 0.8);
    color: #fff;
    border: 1px solid #ce93d8;
}

body.admin-theme td {
    border: 1px solid #ce93d8;
    background: rgba(142, 36, 170, 0.6);
    color: #fff;
}

body.admin-theme form {
    background: rgba(106, 27, 154, 0.8);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ce93d8;
}

body.admin-theme input, body.admin-theme select, body.admin-theme textarea {
    background: rgba(74, 20, 140, 0.9);
    color: #fff;
    border: 1px solid #ce93d8;
}

body.admin-theme button {
    background: linear-gradient(135deg, #9c27b0 0%, #ba68c8 100%);
    border: 2px solid #ce93d8;
    color: #fff;
}
form { margin-bottom: 20px; }
input, select, button { 
    padding: 10px; 
    margin: 5px; 
    background-color: black; 
    color: white; 
    border: 1px solid #4B5563; 
}
.result { 
    border: 1px solid #4B5563; 
    padding: 20px; 
    margin-top: 20px; 
    background-color: #4B5563; 
    color: #301934; 
}
img { max-width: 300px; height: auto; }
.alternates { margin-top: 10px; }
#suggestions { position: relative; }
#suggestions ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    border: 1px solid #4B5563; 
    max-height: 400px; 
    overflow-y: auto; 
    background: #301934; 
    color: #4B5563; 
    min-width: 500px;
    max-width: 800px;
}
#suggestions li { 
    padding: 8px 12px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    white-space: nowrap;
    min-width: 450px;
}
#suggestions li:hover { background: #4B5563; color: #301934; }
#suggestions img { width: 40px; height: auto; margin-right: 10px; flex-shrink: 0; vertical-align: middle; }
#suggestions li span { white-space: nowrap; display: inline-block; max-width: 600px; overflow: hidden; text-overflow: ellipsis; }
#variant-select { width: 100%; padding: 5px; margin: 5px 0; }
a { color: #4B5563; }
.logo-container { 
    display: flex; 
    flex-direction: column; /* Stack logo row and QR vertically */
    align-items: center; 
    justify-content: center; 
    margin-bottom: 20px; 
}
.logo-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}
.logo-container img { max-width: 200px; height: auto; margin: 0 10px; }
.bold-prefix-suffix { font-weight: bold; }
/* Optional witch2 background - uncomment to enable */
/* body { background-image: url('witch2.jpg'); background-size: cover; background-position: center; } */table { width: 100%; border-collapse: collapse; }
th, td { border: 1px solid #4B5563; padding: 8px; text-align: left; }
.heart { cursor: pointer; margin: 0 2px; font-size: 1.2em; }
.heart.filled { color: red; }
.hearts { display: inline-block; }
.heart {
    cursor: pointer;
    margin: 0 2px;
    font-size: 1.5em;
    transition: color 0.2s;
    color: #ccc;
}
.heart.filled {
    color: red;
}
.hearts {
    display: inline-block;
}
table tr { display: table-row; } /* Force row layout */
th, td { white-space: nowrap; } /* Prevent long lines */

.premium-text {
  font-weight: bold;
}
.premium-1 { color: brown; }  /* Copper */
.premium-2 { color: silver; }  /* Silver */
.premium-3 { color: gold; }  /* Gold */
button { pointer-events: auto; z-index: 10; }

/* Responsive overall font sizing */
body { font-size: 1rem; }  /* Default / mobile */
@media (min-width: 768px) {
    body { font-size: 1.1rem; }
}
@media (min-width: 1200px) {
    body { font-size: 1.2rem; }
}
img#card-image { max-width: 450px; }  /* Main card image larger */
#wishlist-section table { font-size: 1.2em; }  /* Wishlist table normal */
.logo-container img { max-width: 300px; }  /* Logos bigger if needed */

/* User QR below witch + tome images */
.user-qr-container {
    width: 240px;
    height: 240px;
    margin-top: 10px;
    background: #111;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voucher-qr-container {
    width: 160px;
    height: 160px;
    margin: 10px 0;
    background: #111;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voucher-info {
    margin: 15px 0;
    padding: 10px;
    border: 1px solid #4B5563;
    border-radius: 8px;
    background: #111827;
}

.logout-btn { position: absolute; bottom: 20px; right: 20px; background: red; color: white; padding: 10px; text-decoration: none; }

.logout-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    background: #301934;
    padding: 10px;
    border-top: 1px solid #4B5563;
}
.logout-btn {
    background: red;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
}

.nav-bar {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.nav-bar button, .nav-bar a {
    background: #4B5563;
    color: #301934;
    padding: 10px 15px;
    margin: 5px;
    border: 1px solid #4B5563;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.nav-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    padding: 15px 25px !important;
    margin: 8px !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 8px !important;
    font-size: 1.1em !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}
.nav-button:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
}
.nav-button:active {
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3) !important;
}
.nav-bar a.logout-btn {
    background: red;
    color: white;
}

/* Wishlist Table */
.wishlist-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.wishlist-table th, .wishlist-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
.wishlist-table th {
    background-color: #f2f2f2;
}

/* Hide any top buttons row (adjust .top-buttons to match your class) */
.top-buttons {
    display: none !important;
}

/* Clearer Top Buttons Row */
.top-nav, .header-buttons, nav {  /* Adjust selector to match your header's class */
    display: flex;
    justify-content: center;  /* Center the row */
    gap: 15px;  /* Space between buttons */
    margin: 10px 0;
    padding: 10px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);  /* Subtle gradient for depth */
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);  /* Soft shadow for clarity */
    flex-wrap: wrap;  /* Stack on mobile */
}

.top-nav a, .top-nav button {  /* Style for links/buttons in the row */
    padding: 12px 20px;  /* Bigger clickable area */
    font-size: 16px;  /* Larger, clearer text */
    font-weight: bold;
    color: #333;  /* Dark text for readability */
    text-decoration: none;
    border: 2px solid #007bff;  /* Blue border */
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;  /* Smooth hover */
    cursor: pointer;
}

.top-nav a:hover, .top-nav button:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);  /* Lift on hover for pop */
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

/* Mobile tweaks */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .logo-container {
        flex-direction: column;
    }

    .logo-container img {
        max-width: 160px;
        margin: 5px 0;
    }

    .user-qr-container {
        margin: 0 0 10px 0;
    }

    .nav-bar {
        padding: 10px;
    }

    .nav-button {
        width: 100%;
        box-sizing: border-box;
        padding: 10px 15px !important;
        margin: 5px 0 !important;
        font-size: 0.95rem !important;
    }

    table {
        font-size: 0.75em;
    }

    .top-nav {
        flex-direction: column;
        gap: 10px;
    }
    .top-nav a, .top-nav button {
        font-size: 14px;
        padding: 10px 15px;
    }
}