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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
}

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

.header {
    padding: 20px;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

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

.header-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: #2a2a2a;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    border: 1px solid #444;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.header-btn:hover {
    background-color: #3a3a3a;
    border-color: #555;
    transform: translateY(-2px);
}

.header-btn i {
    font-size: 16px;
}

.header-btn.map-btn:hover {
    background-color: #1565C0;
    border-color: #1565C0;
}

.header-btn.device-btn:hover {
    background-color: #7B1FA2;
    border-color: #7B1FA2;
}

.register-btn {
    padding: 10px 20px;
    background-color: #00ff88;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.register-btn:hover {
    background-color: #00cc6a;
    transform: translateY(-2px);
}

.gallery-title {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    margin: 0;
}

.search-bar {
    display: flex;
    align-items: center;
    background: #2a2a2a;
    border-radius: 20px;
    padding: 8px 15px;
    width: 400px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border-radius: 5px;
    border: 1px solid #333;
    background-color: #2a2a2a;
    color: white;
    font-size: 16px;
}

.search-bar i {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

.filter-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.sort-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-select {
    padding: 8px 16px;
    border-radius: 5px;
    background-color: #2a2a2a;
    border: 1px solid #333;
    color: white;
    cursor: pointer;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.item-card {
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
}

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

.item-image {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    min-height: 200px;
}

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

.no-thumbnail-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
    border: 2px dashed #555;
    color: #888;
    font-size: 14px;
    gap: 8px;
}

.no-thumbnail-placeholder i {
    font-size: 32px;
    opacity: 0.6;
}

.no-thumbnail-placeholder span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

.status-badge.scheduled {
    background-color: #3498db;
    color: white;
}

.status-badge.ongoing {
    background-color: #2ecc71;
    color: white;
}

.status-badge.ended {
    background-color: #95a5a6;
    color: white;
}

.item-info {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.item-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.item-creator {
    font-size: 14px;
    color: #888;
    margin-bottom: 10px;
}

.item-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 13px;
    color: #aaa;
    margin-bottom: 10px;
}

.item-location {
    display: flex;
    align-items: center;
    gap: 5px;
}

.item-location::before {
    content: '📍';
    font-size: 12px;
}

.item-dates {
    display: flex;
    align-items: center;
    gap: 5px;
}

.item-dates::before {
    content: '📅';
    font-size: 12px;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #333;
}

.edit-button, .delete-button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.edit-button {
    background-color: #1565C0;
    color: #ffffff;
}

.edit-button:hover {
    background-color: #0D47A1;
    transform: translateY(-2px);
}

.delete-button {
    background-color: #ff5252;
    color: white;
}

.delete-button:hover {
    background-color: #ff1744;
    transform: translateY(-2px);
}

.loading {
    text-align: center;
    padding: 20px;
    color: #ccc;
}

.error-message {
    text-align: center;
    padding: 20px;
    color: #e74c3c;
}

.no-items {
    text-align: center;
    padding: 40px;
    color: #ccc;
    font-size: 18px;
}

.snackbar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 1.1em;
    z-index: 9999;
    opacity: 0.95;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: none;
}
.snackbar.show {
    display: block;
}

/* 로딩 인디케이터 */
.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    text-align: center;
    background: rgba(26, 26, 26, 0.95);
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid #333;
    border-top-color: #00ff88;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px auto;
}

.loading-text {
    color: #888;
    font-size: 16px;
    margin-top: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 스크롤 로딩 인디케이터 (하단) */
.loading-more-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
    text-align: center;
    background: rgba(26, 26, 26, 0.95);
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
}

.loading-more-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #333;
    border-top-color: #00ff88;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-more-text {
    color: #888;
    font-size: 14px;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* 스크롤 업 버튼 */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #00ff88;
    color: #1a1a1a;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: #00cc6a;
    transform: translateY(-5px);
}
