:root {
    --ghibli-cream: #FFF9F5;
    --ghibli-green: #A8C69F;
    --ghibli-green-dark: #7D9D74;
    --ghibli-sky: #A2D2FF;
    --ghibli-wood: #8B5E3C;
    --ghibli-accent: #FFADAD;
    --ghibli-text: #4A4036;
}

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

body.ghibli-theme {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--ghibli-cream);
    color: var(--ghibli-text);
    overflow-x: hidden;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.8) 1px, transparent 1px);
    background-size: 20px 20px;
    min-height: 100vh;
}

header {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(to bottom, var(--ghibli-sky), transparent);
}

.main-title {
    font-family: 'Gamja Flower', cursive;
    font-size: 4rem;
    color: var(--ghibli-wood);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--ghibli-text);
    font-style: italic;
    margin-bottom: 1rem;
}

.main-nav {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.nav-btn {
    background: white;
    border: 2px solid var(--ghibli-wood);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-family: 'Gamja Flower', cursive;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--ghibli-wood);
}

.nav-btn.active {
    background: var(--ghibli-wood);
    color: white;
}

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

.hidden {
    display: none !important;
}

/* Admin View */
.admin-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 30px;
    border: 4px solid var(--ghibli-wood);
}

.admin-title {
    font-family: 'Gamja Flower', cursive;
    font-size: 2.5rem;
    color: var(--ghibli-wood);
    margin-bottom: 2rem;
    text-align: center;
}

.admin-grid {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.admin-item {
    display: grid;
    grid-template-columns: 100px 1.2fr 1.5fr 200px;
    align-items: center;
    gap: 1.5rem;
    padding: 1.2rem;
    background: #fdfdfd;
    border-radius: 15px;
    border: 1px solid #eee;
    transition: background 0.2s;
}

.admin-source-input {
    padding: 0.5rem;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 0.8rem;
    width: 100%;
    outline: none;
}

.admin-source-input:focus {
    border-color: var(--ghibli-wood);
}

.admin-item:hover {
    background: #f9f9f9;
}

.admin-thumb {
    width: 100px;
    height: 75px;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    border: 2px solid var(--ghibli-wood);
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-upload-admin {
    background: var(--ghibli-wood);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
    flex: 1;
}

.btn-reset-admin {
    background: var(--ghibli-accent);
    color: var(--ghibli-wood);
    border: 1px solid var(--ghibli-wood);
    padding: 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
}

.admin-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.btn-clear-all {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
}

.login-box {
    max-width: 400px !important;
    text-align: center;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.login-form input {
    padding: 0.8rem;
    border-radius: 10px;
    border: 2px solid var(--ghibli-wood);
    outline: none;
}

#btn-login {
    background: var(--ghibli-wood);
    color: white;
    padding: 0.8rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
}

.error-text {
    color: #e74c3c;
    font-size: 0.9rem;
}

#search-input {
    width: 100%;
    padding: 1rem 2rem;
    border-radius: 50px;
    border: 3px solid var(--ghibli-wood);
    font-size: 1.1rem;
    font-family: 'Noto Sans KR', sans-serif;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    outline: none;
    transition: transform 0.2s;
}

#search-input:focus {
    transform: scale(1.02);
}

.hotspot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.spot-card {
    background: white;
    border-radius: 20px;
    border: 3px solid var(--ghibli-wood);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.spot-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.card-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: var(--ghibli-cream);
    border-bottom: 2px solid var(--ghibli-wood);
    position: relative;
}

.image-source-label {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-size: 0.6rem;
    pointer-events: none;
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    z-index: 5;
}

.upload-btn {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--ghibli-wood);
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    cursor: pointer;
    font-weight: bold;
    color: var(--ghibli-wood);
    transition: background 0.2s;
}

.upload-btn:hover {
    background: var(--ghibli-accent);
}

.card-content {
    padding: 1.5rem;
}

.card-tag {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--ghibli-green-dark);
    margin-bottom: 0.5rem;
    display: block;
}

.card-title {
    font-family: 'Gamja Flower', cursive;
    font-size: 1.8rem;
    color: var(--ghibli-wood);
    margin-bottom: 0.5rem;
}

.card-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--ghibli-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    padding: 2.5rem;
    border-radius: 25px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    border: 4px solid var(--ghibli-wood);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--ghibli-wood);
    line-height: 1;
}

#blog-body h2 {
    font-family: 'Gamja Flower', cursive;
    font-size: 2.5rem;
    color: var(--ghibli-wood);
    margin-bottom: 1.5rem;
}

.blog-image {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    background-color: var(--ghibli-cream);
}

.blog-content p {
    line-height: 1.8;
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
}

.navigation-section {
    background: var(--ghibli-cream);
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px dashed var(--ghibli-wood);
    margin-top: 2rem;
}

.navigation-section h3 {
    font-family: 'Gamja Flower', cursive;
    font-size: 1.8rem;
    color: var(--ghibli-wood);
    margin-bottom: 0.8rem;
}

.map-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--ghibli-wood);
    font-weight: bold;
    text-decoration: none;
    background: var(--ghibli-accent);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    transition: transform 0.2s;
}

.map-link:hover {
    transform: translateX(5px);
}

.viral-tag {
    display: inline-block;
    background: var(--ghibli-sky);
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--ghibli-text);
}

footer {
    text-align: center;
    padding: 3rem;
    color: var(--ghibli-wood);
    font-style: italic;
}

@media (max-width: 600px) {
    .main-title {
        font-size: 2.8rem;
    }
    .hotspot-grid {
        grid-template-columns: 1fr;
    }
}
