* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

:root {
    --bg: #ffffff;
    --text: #000000;
    --card: #f4f4f4;
}

:root.dark {
    --bg: #121212;
    --text: #454444;
    --card: #f6efef;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.card {
    background: var(--card);
    padding: 1rem;
    border-radius: 10px;
}


.theme-switch {
    position: fixed;
    bottom: 0;       
    left: 0;         
    margin: 0 0 5px 5px; 

    width: 55px;
    height: 30px;
    z-index: 9999; 
}


.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}


.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0;
    right: 0; bottom:0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 34px;
}


.slider:before {
    position: absolute;
    content: "🌙";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background-color: rgb(11, 11, 11);
    transition: .3s;
    border-radius: 50%;
}


input:checked + .slider {
    background-color: #444;
}


input:checked + .slider:before {
    transform: translateX(25px);
}


.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}

.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30px;
padding-bottom: 20px;
border-bottom: 1px solid #e0e0e0;
}

.header h1 {
font-size: 2.5rem;
font-weight: 700;
letter-spacing: -1px;
}

.header-actions {
display: flex;
gap: 15px;
align-items: center;
}

.custom-items-badge {
background-color: #000;
color: #fff;
padding: 10px 20px;
border-radius: 25px;
font-size: 0.9rem;
font-weight: 600;
}

.reset-btn:hover {
background-color: #000;
color: #fff;
}

/* Search and Filters */
.controls {
display: flex;
gap: 15px;
margin-bottom: 25px;
flex-wrap: wrap;
align-items: center;
}

.search-box {
flex: 1;
min-width: 250px;
}

.search-box input {
width: 100%;
padding: 12px 20px;
border: 2px solid #e0e0e0;
border-radius: 25px;
font-size: 1rem;
outline: none;
transition: border-color 0.3s;
}

.search-box input:focus {
border-color: #000;
}

.filter-group {
display: flex;
gap: 10px;
}

.filter-btn, .sort-btn {
padding: 10px 20px;
border: 2px solid #e0e0e0;
background-color: #fff;
border-radius: 25px;
font-size: 0.9rem;
cursor: pointer;
transition: all 0.3s;
font-weight: 500;
}

.filter-btn:hover, .sort-btn:hover, .custom-items-badge:hover {
border-color: #E18AAA;
}

.filter-btn.active, .sort-btn.active {
background-color: #E18AAA;
color: #000000;
border-color: #E18AAA;
}

select.sort-select {
padding: 10px 20px;
border: 2px solid #e0e0e0;
border-radius: 25px;
font-size: 0.9rem;
cursor: pointer;
outline: none;
background-color: #fff;
font-weight: 500;
}

/* Grid Layout */
.items-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 30px;
margin-bottom: 40px;
}

/* Item Card */
.item-card {
background-color: #fff;
border-radius: 15px;
overflow: hidden;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
transition: transform 0.3s, box-shadow 0.3s;
cursor: pointer;
}

.item-card:hover {
transform: translateY(-5px);
box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.item-image {
width: 100%;
height: 300px;
object-fit: cover;
background-color: #f5f5f5;
}

.item-info {
padding: 15px;
}

.item-category {
font-size: 0.8rem;
color: #666;
text-transform: uppercase;
letter-spacing: 1px;
margin-bottom: 5px;
}

.item-name {
font-size: 1.1rem;
font-weight: 600;
margin-bottom: 8px;
}

.item-tags {
display: flex;
gap: 5px;
flex-wrap: wrap;
}

.tag {
padding: 4px 10px;
background-color: #f0f0f0;
border-radius: 12px;
font-size: 0.75rem;
color: #666;
}

/* Pagination */
.pagination {
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
margin-top: 120px;
}

.pagination button {
padding: 10px 20px;
border: 2px solid #e0e0e0;
background-color: #fff;
border-radius: 20px;
cursor: pointer;
transition: all 0.3s;
font-weight: 500;
}

.pagination button:hover:not(:disabled) {
border-color: #000;
background-color: #000;
color: #fff;
}

.pagination button:disabled {
opacity: 0.5;
cursor: not-allowed;
}

.pagination .page-number {
padding: 10px 20px;
border: 2px solid #e0e0e0;
background-color: #fff;
border-radius: 20px;
font-weight: 500;
}

.pagination .page-number.active {
background-color: #000;
color: #fff;
border-color: #000;
}
.item-card {
position: relative; 
overflow: visible;    
}

.item-menu {
position: absolute;
top: 10px;
right: 10px;
z-index: 100;
}

.ellipsis-btn {
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
z-index: 101;
padding: 5px; 
}

.item-menu-dropdown {
display: none; /* hidden by default */
position: absolute;
top: 30px;
right: 0;
background: #fff;
border: 1px solid #ccc;
border-radius: 10px;
min-width: 80px;
z-index: 102;
box-shadow: 0 2px 10px rgba(0,0,0,0.2);
flex-direction: column;
}

.item-menu-dropdown .menu-option {
width: 100%;
padding: 8px 12px;
background: none;
border: none;
text-align: left;
cursor: pointer;
}

.item-menu-dropdown .menu-option:hover {
background-color: #f0f0f0;
}

/* JS toggle */
.item-menu.active .item-menu-dropdown {
display: flex;
}

form {
width: 30%;
margin: 0 auto;
}
/* Slight zoom animation */
@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Cursor hint */
.item-image {
    cursor: zoom-in;
}

/* Fullscreen dark overlay */
.image-modal {
    display: none;
    position: fixed;
    inset: 0; /* top:0; right:0; bottom:0; left:0 */
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

/* Container for image + text */
.modal-box {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100vw;
    max-height: 100vh;
}

/* BIG image in the popup */
.modal-content {
    width: 65vw; 
    max-height: 70vh;
    object-fit: contain;
    border-radius: 16px;
    margin-bottom: 20px;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 38px;
    color: white;
    cursor: pointer;
}

.modal-details {
    text-align: center;
    color: white;
    max-width: 80vw;
}

#modalName {
    font-size: 2rem;
    margin-bottom: 10px;
}

#modalCategory {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 10px;
}

/* Tags styling */
#modalTags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

#modalTags span {
    background: rgba(255,255,255,0.15);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.message-box {
display: none;
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.45);
justify-content: center;
align-items: center;
z-index: 9999;
}

.message-content {
position: relative; 
background: white;
padding: 30px;
max-width: 90%;     
width: 480px;    
border-radius: 12px;
box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
border: 3px solid #E18AAA;
animation: fadeIn 0.3s ease-out;
}
.message-content h2 {
margin-top: 0;
}

.message-content ul {
margin-left: 20px;        
}

.close {
position: absolute;
top: 10px;
right: 10px;
font-size: 24px;
font-weight: bold;
color: #333;
cursor: pointer;
}

.instructions-list li{
margin-bottom: 5px;
}

/* DARK MODE OVERRIDES */
html.dark .item-card,
html.dark .selector-card {
    background: #1e1e1e !important;
    border-color: #333 !important;
    color: #fff !important;
}

body.dark .search-box input {
    background-color: #2b2b2b !important;
    color: #fff !important;
    border: 1px solid #555 !important;
}

html.dark .item-info,
html.dark .item-category,
html.dark .item-name {
    color: #fff !important;
}

html.dark select,
html.dark .selector-card select {
    background: #2a2a2a !important;
    color: #fff !important;
    border-color: #444 !important;
}

html.dark .outfit-preview-box {
    background: #1c1c1c !important;
    border-color: #333 !important;
}

html.dark .outfit-empty-text {
    color: #bbb !important;
}

html.dark #outfitPreview img {
    background: none !important;
}

html.dark .tag {
    background: #333 !important;
    color: #fff !important;
}

html.dark button:not(.menu-option) {
    background: #000 !important;
    color: #fff !important;
    border-color: #444 !important;
}

html.dark .ellipsis-btn,
html.dark button.ellipsis-btn {
    background: none !important;
    color: black !important;
    border: none !important;
    filter: none !important;
}







