:root {
    --bg-color: #f8f9fa;
    --primary: #4a90e2;
    --secondary: #6c757d;
    --accent: #ff4757;
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-main: #2d3436;
    --text-muted: #636e72;
    --glass: rgba(255, 255, 255, 0.7);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Noto Sans KR', 'Outfit', sans-serif;
    background: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    padding-bottom: 80px;
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 10px 0;
    animation: fadeInDown 0.8s ease;
}

.logo-section h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -1px;
}

.logo-section p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.admin-toggle button {
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.admin-toggle button.active {
    background: var(--primary);
    color: white;
}

/* Nav Filters */
.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.filter-btn {
    padding: 8px 18px;
    border-radius: 20px;
    border: none;
    background: var(--glass);
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

/* Item Grid */
.item-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.item-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: zoomIn 0.5s ease backwards;
}

.item-card:hover {
    transform: translateY(-5px);
}

.item-img-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background: #eee;
}

.item-img-container img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

.status-badge {
    position: absolute;
    top: 10px; right: 10px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    background: var(--primary);
}

.status-badge.completed { background: var(--secondary); }
.status-badge.active { background: var(--primary); }
.status-badge.warning { background: var(--accent); }

.item-card.pending {
    border: 2px dashed var(--accent);
    opacity: 0.9;
}

.item-info {
    padding: 12px;
}

.item-location {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.item-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.admin-actions {
    display: none;
    padding: 8px 12px;
    border-top: 1px solid rgba(0,0,0,0.05);
    gap: 8px;
}

body.admin-mode .admin-actions {
    display: flex;
}

.action-btn {
    flex: 1;
    padding: 6px;
    border-radius: 8px;
    border: none;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.claim-btn { background: #55efc4; color: #00b894; }
.delete-btn { background: #fab1a0; color: #d63031; }

/* FAB */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border-radius: 30px;
    border: none;
    font-size: 30px;
    box-shadow: 0 10px 25px rgba(74, 144, 226, 0.4);
    cursor: pointer;
    transition: all 0.3s;
    z-index: 100;
}

.fab:active { transform: scale(0.9); }

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 400px;
    padding: 30px;
    border-radius: 25px;
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.modal-content.small { max-width: 320px; }

.close {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
}

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

.custom-file-upload {
    display: block;
    padding: 20px;
    background: #f1f2f6;
    border: 2px dashed var(--primary);
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

input[type="file"] { display: none; }

.image-preview {
    margin-top: 10px;
    max-height: 200px;
    border-radius: 10px;
    overflow: hidden;
    display: none;
}

.image-preview img { width: 100%; height: auto; display: block; }

input[type="text"], input[type="password"], select, textarea {
    width: 100%;
    padding: 14px 20px;
    border-radius: 15px;
    border: 2px solid #f1f2f6;
    background: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    color: var(--text-main);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%234a90e2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
    cursor: pointer;
    padding-right: 45px;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.15);
    background: #fff;
}

textarea { height: 100px; resize: none; }

.submit-btn, .confirm-btn, #adminLoginBtn {
    width: 100%;
    padding: 16px;
    border-radius: 15px;
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, #357abd 100%);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.3);
    transition: all 0.3s;
}

.submit-btn:hover, .confirm-btn:hover, #adminLoginBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(74, 144, 226, 0.4);
}

.btn-group { display: flex; gap: 10px; margin-top: 10px; }
#adminCancelBtn { flex: 1; padding: 12px; background: transparent; border: none; cursor: pointer; color: var(--text-muted); }
#adminLoginBtn { flex: 2; }

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile responsive fixes */
@media (max-width: 400px) {
    .item-grid { grid-template-columns: 1fr; }
}
