/* Reset & Base Styles - Alphonse Mucha Art Nouveau Theme */
:root {
    --primary-color: #b8955a; /* Antique Gold */
    --secondary-color: #6b725c; /* Muted Olive */
    --text-dark: #4a3b32; /* Deep Sepia */
    --text-light: #8c7b70; /* Warm Gray/Brown */
    --bg-light: #f5ebd9; /* Warm Parchment */
    --bg-white: #fdfbf7; /* Light Cream */
    --navbar-bg: rgba(253, 251, 247, 0.95);
    --border-color: #d4c3a3; /* Light Gold/Brown */
    --accent-red: #a65d57; /* Faded Brick Red */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --text-dark: #f0e6d2;
    --text-light: #bbaea0;
    --bg-light: #2c2421;
    --bg-white: #3a2f2b;
    --navbar-bg: rgba(58, 47, 43, 0.95);
    --border-color: #5a4b42;
    --primary-color: #cca876;
    --accent-red: #c97a73;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Cormorant Garamond', 'Noto Serif KR', serif;
    color: var(--text-dark);
    line-height: 1.7;
    background-color: var(--bg-white);
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 40px 40px;
    background-attachment: fixed;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', 'Noto Serif KR', serif;
    font-weight: 700;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 100px 0; }
.bg-light { background-color: var(--bg-light); }

/* Header & Navbar - Enhanced Art Nouveau Ornamentation */
header {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: var(--navbar-bg); backdrop-filter: blur(5px);
    border-bottom: 3px double var(--primary-color);
    box-shadow: 0 4px 15px rgba(74, 59, 50, 0.1);
}
header::after {
    content: '❦ ❧'; position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%);
    background: var(--bg-white); padding: 0 15px; color: var(--primary-color);
    font-size: 1.2rem; border: 1px solid var(--primary-color); border-radius: 20px;
}
.navbar { height: 90px; display: flex; align-items: center; }
.navbar .container { display: flex; justify-content: space-between; align-items: center; width: 100%; }

/* Logo Styles */
.logo a { display: flex; align-items: center; gap: 10px; }
.logo-img { 
    height: 45px; width: auto; max-width: 150px;
    border: 2px double var(--primary-color); padding: 3px; 
    background: var(--bg-white); border-radius: 4px; transition: transform 0.3s ease;
    object-fit: contain;
}
.logo span { 
    color: var(--primary-color); font-family: 'Playfair Display', serif;
    font-weight: 700; font-size: 1.4rem; letter-spacing: 1px;
}

.nav-links { display: flex; gap: 2.5rem; align-items: center; }
.nav-links > li > a { 
    font-size: 1.1rem; color: var(--text-dark); letter-spacing: 0.5px; position: relative; 
    font-family: 'Noto Serif KR', serif; font-weight: 600;
}
.nav-links > li > a::after {
    content: ''; position: absolute; width: 0; height: 1px; bottom: -3px; left: 0;
    background-color: var(--primary-color); transition: var(--transition);
}
.nav-links > li > a:hover { color: var(--primary-color); }
.nav-links > li > a:hover::after { width: 100%; }

/* Mobile Responsiveness for Navbar */
@media (max-width: 1024px) {
    .nav-links { gap: 1.5rem; }
    .nav-links > li > a { font-size: 1rem; }
    .logo span { font-size: 1.2rem; }
}

@media (max-width: 768px) {
    .navbar { height: auto; padding: 1rem 0; }
    .navbar .container { flex-direction: column; gap: 1rem; }
    .nav-links { gap: 1rem; flex-wrap: wrap; justify-content: center; }
    .nav-links > li > a { font-size: 0.9rem; }
    .theme-switch-wrapper { margin-left: 0; margin-top: 0.5rem; }
    header::after { display: none; }
}

/* Theme Switch */
.theme-switch-wrapper { display: flex; align-items: center; margin-left: 1.5rem; }
.theme-switch { display: inline-block; height: 26px; position: relative; width: 50px; }
.theme-switch input { display: none; }
.slider {
    background-color: var(--border-color); bottom: 0; cursor: pointer; left: 0; position: absolute; right: 0; top: 0;
    transition: .4s; display: flex; align-items: center; justify-content: space-around; padding: 0 5px;
    border: 1px solid var(--text-dark);
}
.slider.round { border-radius: 34px; }
.slider.round:before {
    background-color: var(--bg-white); bottom: 2px; content: ""; height: 20px; left: 3px; position: absolute;
    transition: .4s; width: 20px; border-radius: 50%; z-index: 2; border: 1px solid var(--text-dark);
}
input:checked + .slider { background-color: var(--secondary-color); }
input:checked + .slider:before { transform: translateX(22px); }

/* Language Switcher */
.obvious-lang-switcher {
    position: fixed !important; top: 100px !important; right: 20px !important; z-index: 9999;
    background: var(--bg-white) !important; padding: 6px 10px !important; border-radius: 4px !important;
    display: flex !important; gap: 8px !important; box-shadow: 0 4px 15px rgba(74, 59, 50, 0.15) !important;
    border: 2px double var(--primary-color) !important;
}
.obvious-lang-switcher button {
    background: transparent !important; border: 1px solid transparent !important; color: var(--text-light) !important;
    padding: 4px 8px !important; border-radius: 2px !important; cursor: pointer !important; font-weight: 600; font-size: 0.8rem;
    font-family: 'Playfair Display', serif;
}
.obvious-lang-switcher button.active { background: var(--bg-light) !important; color: var(--primary-color) !important; border: 1px solid var(--primary-color) !important; }

/* Guestbook Box UI */
.guestbook-card {
    max-width: 500px;
    margin: 0 auto; 
    background: var(--bg-white);
    border-radius: 4px; 
    border: 3px double var(--primary-color);
    box-shadow: 0 10px 30px rgba(74, 59, 50, 0.1); 
    overflow: hidden;
    position: relative;
}
.guestbook-card::before {
    content: ''; position: absolute; top: 5px; left: 5px; right: 5px; bottom: 5px;
    border: 1px solid var(--border-color); pointer-events: none;
}
.guestbook-form { 
    padding: 1.5rem; 
    border-bottom: 2px double var(--primary-color); 
    background: var(--bg-light); 
    position: relative; z-index: 1;
}
.guestbook-messages {
    height: 350px;
    overflow-y: auto; 
    padding: 1.5rem;
    display: flex; 
    flex-direction: column; 
    gap: 1rem;
    position: relative; z-index: 1;
}
.comment-item {
    background: var(--bg-white); 
    padding: 1rem; 
    border-radius: 2px;
    position: relative; 
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
}
.comment-author { 
    font-weight: 700; 
    font-size: 1rem; 
    color: var(--primary-color); 
    margin-right: 8px; 
    font-family: 'Playfair Display', serif;
}
.comment-time { font-size: 0.75rem; color: var(--text-light); font-style: italic; }
.comment-text { font-size: 1rem; margin-top: 4px; color: var(--text-dark); line-height: 1.5; }
.comment-delete-x {
    position: absolute; top: 8px; right: 10px; background: none; border: none;
    color: var(--text-light); cursor: pointer; font-size: 1.2rem;
}
.comment-item:hover .comment-delete-x { color: var(--accent-red); }

/* Gallery Grid */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; }
.gallery-item {
    border-radius: 2px; overflow: hidden; aspect-ratio: 1/1; position: relative;
    box-shadow: 0 4px 15px rgba(74, 59, 50, 0.1);
    background: var(--bg-white);
    padding: 6px;
    border: 1px solid var(--border-color);
}
.gallery-item::after {
    content: ''; position: absolute; top: 10px; left: 10px; right: 10px; bottom: 10px;
    border: 1px solid rgba(255,255,255,0.3); pointer-events: none;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.gallery-item .delete-btn {
    position: absolute; top: 12px; right: 12px; background: var(--accent-red);
    color: #fff; border: 1px solid #fff; padding: 4px 10px; border-radius: 2px; cursor: pointer; opacity: 0;
    font-family: 'Playfair Display', serif; font-size: 0.8rem; z-index: 10;
}
.gallery-item:hover .delete-btn { opacity: 1; }

/* Buttons & Inputs */
.btn {
    padding: 0.7rem 1.5rem; border-radius: 2px; font-weight: 600; cursor: pointer; 
    border: 1px solid var(--primary-color); background: transparent; color: var(--primary-color);
    transition: .3s; font-family: 'Playfair Display', 'Noto Serif KR', serif; text-transform: uppercase; letter-spacing: 1px;
}
.btn:hover { background-color: var(--bg-light); }
.btn-primary { background-color: var(--primary-color); color: var(--bg-white); }
.btn-primary:hover { background-color: var(--text-dark); color: var(--bg-white); border-color: var(--text-dark); }
.input-field {
    width: 100%; padding: 0.8rem; border: 1px solid var(--border-color);
    border-radius: 2px; background: var(--bg-white); margin-bottom: 0.5rem;
    font-family: 'Cormorant Garamond', 'Noto Serif KR', serif; font-size: 1rem; color: var(--text-dark);
}
.input-field:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(184, 149, 90, 0.2); }

/* Sections */
.section-title { 
    font-size: 2.8rem; text-align: center; margin-bottom: 3rem; 
    color: var(--primary-color); position: relative; display: inline-block; left: 50%; transform: translateX(-50%);
}
.section-title::before, .section-title::after {
    content: '✧'; position: absolute; top: 50%; transform: translateY(-50%); color: var(--secondary-color); font-size: 1.5rem;
}
.section-title::before { left: -40px; }
.section-title::after { right: -40px; }

.hero { padding: 180px 0 100px; background-color: var(--bg-light); text-align: center; position: relative; border-bottom: 2px double var(--border-color); }
.hero::before {
    content: '✿'; position: absolute; top: 100px; left: 5%; font-size: 5rem; color: var(--primary-color); opacity: 0.1;
}
.hero::after {
    content: '✿'; position: absolute; top: 100px; right: 5%; font-size: 5rem; color: var(--primary-color); opacity: 0.1;
}
.hero-content h1 { font-size: 3.5rem; margin-bottom: 1.5rem; line-height: 1.2; }
.hero-content h1 span { color: var(--primary-color); font-style: italic; }
.hero-content p { font-size: 1.2rem; color: var(--text-light); max-width: 600px; margin: 0 auto; }

/* Restored & Enhanced Morphing Shape (The "Ball") */
.abstract-shape { 
    width: 280px; height: 280px; margin: 3rem auto; 
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); 
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 8s infinite ease-in-out;
    position: relative;
    box-shadow: 0 20px 40px rgba(184, 149, 90, 0.3);
    border: 2px solid var(--bg-white);
}
.abstract-shape::before {
    content: ''; position: absolute; top: -10px; left: -10px; right: -10px; bottom: -10px;
    border: 1px solid var(--primary-color); border-radius: inherit; opacity: 0.5;
    animation: morph 8s infinite ease-in-out reverse;
}
@keyframes morph { 
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: scale(1) rotate(0deg); } 
    50% { border-radius: 50% 50% 20% / 25% 80% 20% 75%; transform: scale(1.05) rotate(15deg); } 
}

footer { 
    padding: 3rem 0; border-top: 2px double var(--border-color); 
    text-align: center; font-size: 1rem; background: var(--bg-light);
    font-family: 'Playfair Display', serif;
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-content h1 { font-size: 2.5rem; }
    .section-title { font-size: 2rem; }
}

/* Scrollbar styling for Art Nouveau feel */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-light); border-left: 1px solid var(--border-color); }
::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dark); }
