@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

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

body {
    font-family: 'Space Mono', monospace;
    min-height: 100vh;
    background: linear-gradient(135deg, #fff5f5 0%, #fef6e4 50%, #f5f0ff 100%);
    color: #2e2e2e;
    line-height: 1.6;
}

/* Header */
header {
    text-align: center;
    padding: 30px 20px 20px;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #e85d75, #f59e0b, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 25px;
}

nav ul li a {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

nav ul li a:hover,
nav ul li a.active {
    color: #e85d75;
    border-bottom-color: #e85d75;
}

/* Main */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

footer {
    text-align: center;
    padding: 30px 20px;
    color: #9ca3af;
    font-size: 0.8rem;
}

/* Closet Header */
.closet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.closet-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2e2e2e;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: 3px solid;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #e85d75;
    color: white;
    border-color: #e85d75;
}

.btn-primary:hover {
    background: white;
    color: #e85d75;
}

.btn-secondary {
    background: white;
    color: #6c757d;
    border-color: #ddd;
}

.btn-secondary:hover {
    border-color: #6c757d;
    color: #2e2e2e;
}

.btn-danger {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.btn-danger:hover {
    background: white;
    color: #ff6b6b;
}

/* Filters */
.filters {
    margin-bottom: 25px;
}

.filters select {
    padding: 10px 15px;
    border: 2px solid #ddd;
    font-size: 0.85rem;
    font-family: 'Space Mono', monospace;
    background: white;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filters select:focus {
    outline: none;
    border-color: #e85d75;
}

/* Items Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.item-card {
    background: white;
    border: 2px solid transparent;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: relative;
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e85d75, #f59e0b);
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-color: #e85d75;
}

.item-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: #f8f8f8;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-info {
    padding: 15px;
}

.item-info h4 {
    margin: 0 0 10px 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: #2e2e2e;
}

.category-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid;
}

.category-badge.tops { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.category-badge.bottoms { background: #e3f2fd; color: #1565c0; border-color: #90caf9; }
.category-badge.dresses { background: #fce4ec; color: #c2185b; border-color: #f48fb1; }
.category-badge.outerwear { background: #fff3e0; color: #e65100; border-color: #ffcc80; }
.category-badge.shoes { background: #f3e5f5; color: #7b1fa2; border-color: #ce93d8; }
.category-badge.accessories { background: #fff8e1; color: #f9a825; border-color: #ffe082; }

.color-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 4px 10px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f5f5f5;
    color: #666;
    border: 2px solid #eee;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #6c757d;
}

.empty-state p {
    margin: 8px 0;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.open {
    display: flex;
}

.modal-content {
    background: white;
    border: 3px solid #e85d75;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: #e85d75;
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.close-btn:hover {
    opacity: 1;
}

/* Form */
#item-form {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.75rem;
    color: #2e2e2e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    font-size: 0.9rem;
    font-family: 'Space Mono', monospace;
    transition: border-color 0.2s;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #e85d75;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    font-size: 0.8rem;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #e85d75;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 10px 0;
    font-size: 0.85rem;
}

.image-preview {
    margin-top: 15px;
}

.image-preview img {
    max-width: 100%;
    max-height: 200px;
    border: 2px solid #eee;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #eee;
}

.form-actions-right {
    display: flex;
    gap: 12px;
}

/* Responsive */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.6rem;
    }

    .closet-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .modal-content {
        width: 95%;
        margin: 10px;
    }

    .btn {
        padding: 10px 18px;
        font-size: 0.8rem;
    }
}
