:root {
    --bg-color: #000000; /* 기본 배경 검은색으로 변경 */
    --font-color: #e0e0e0;
    --dim-font-color: #888;
    --accent-color: #007AFF;
    --input-bg-color: rgba(255, 255, 255, 0.08);
}
body, html {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--font-color);
    font-family: 'Segoe UI', sans-serif;
    overflow: hidden;
}

#brand-name {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 2em;
    font-weight: 300;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 10;
    margin: 0;
    padding: 0;
}

#album-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
}
#slideshow {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
}

/* 사진 및 비디오 크기 문제 해결 */
#slideshow img,
#slideshow video {
    min-width: 100%;
    min-height: 100%;
    max-width: 100vw;   /* 화면 너비에 맞게 최대 너비 제한 */
    max-height: 100vh;  /* 화면 높이에 맞게 최대 높이 제한 */
    object-fit: contain; /* 이제 전체 이미지를 보여주고, 배경이 빈 공간을 채웁니다. */
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    position: relative; /* z-index를 위해 relative로 변경 */
    z-index: 2;
}

#background-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(25px) brightness(0.6);
    transform: scale(1.2);
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
}

#slideshow img.active,
#slideshow video.active {
    opacity: 1;
}

/* Fade Transition */
.fade-in {
    animation: fadeIn 0.8s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Slide Transition */
.slide-in-next {
    animation: slideInFromRight 0.6s ease-out forwards;
}
.slide-in-prev {
    animation: slideInFromLeft 0.6s ease-out forwards;
}
.slide-out-next {
    animation: slideOutToLeft 0.6s ease-in forwards;
}
.slide-out-prev {
    animation: slideOutToRight 0.6s ease-in forwards;
}

@keyframes slideInFromRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideInFromLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutToLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-100%); opacity: 0; }
}
@keyframes slideOutToRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

#initial-message {
    text-align: center;
    color: var(--dim-font-color);
    position: relative; /* 다른 요소와 겹치지 않게 */
    z-index: 1;
}
#initial-message h1 {
    font-weight: 300;
}
.bottom-links {
    position: fixed;
    bottom: 20px; /* Start at the same bottom as toggle-btn */
    left: 50%;
    transform: translateX(-50%) translateY(100px); /* Initially hide below the screen */
    display: flex;
    gap: 15px;
    z-index: 10;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
    pointer-events: none; /* Make it non-interactive when hidden */
    backdrop-filter: blur(5px); /* Frosted glass effect */
    background-color: rgba(0, 0, 0, 0.2); /* Slightly transparent background */
    border-radius: 10px;
    padding: 10px 15px;
}

.bottom-links.open {
    transform: translateX(-50%) translateY(-50px); /* Adjust position when open, above the toggle button */
    opacity: 1;
    pointer-events: auto; /* Make it interactive when open */
}

#toggle-btn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.15); /* Subtle translucent */
    backdrop-filter: blur(5px); /* Frosted glass effect */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2em;
    line-height: 1; /* Added for vertical centering of '+' */
    font-weight: bold; /* Added for a thicker '+' */
    cursor: pointer;
    z-index: 11; /* Above the links container */
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    user-select: none;
}

#toggle-btn.open {
    transform: translateX(-50%) rotate(45deg); /* Rotate to form an 'X' */
    background-color: rgba(255, 255, 255, 0.3); /* Slightly brighter translucent when open */
    border-color: rgba(255, 255, 255, 0.2);
}

.settings-link {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15); /* Subtle border */
    color: #fff;
    padding: 8px 16px; /* Slightly larger padding for better touch targets */
    border-radius: 10px; /* Slightly less rounded than 15px, more Apple-like */
    text-decoration: none;
    font-size: 14px;
    opacity: 1; /* Always visible, opacity change on hover */
    transition: background-color 0.2s ease, border-color 0.2s ease;
    backdrop-filter: blur(5px); /* Frosted glass effect */
}

.settings-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

/* Form Elements */
input[type="text"],
input[type="email"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px; /* Slightly more rounded */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Subtle border */
    background-color: var(--input-bg-color); /* Use variable */
    color: var(--font-color);
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    -webkit-appearance: none; /* For select dropdown arrow */
    -moz-appearance: none;
    appearance: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.15); /* Slightly brighter on focus */
    outline: none;
}

select {
    padding-right: 30px; /* Make space for custom arrow if needed */
    background-image: url('data:image/svg+xml;utf8,<svg fill="white" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 24px;
}

/* General Glass Container Style */
.glass-container {
    background-color: rgba(0, 0, 0, 0.3); /* Darker translucent background */
    backdrop-filter: blur(10px); /* Stronger blur for frosted effect */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px; /* More pronounced rounded corners */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Subtle shadow */
}

/* Gallery Page Specific Styles (from gallery.html inline, refined) */
.gallery-body { /* New class for gallery body, to use for padding */
    padding: 20px;
}

.gallery-page-h1 { /* New class for gallery h1 */
    text-align: center;
    font-weight: 300;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle border */
    padding-bottom: 20px;
    margin-top: 0;
    color: var(--font-color);
}

#thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}
.thumbnail-item {
    width: 100%;
    height: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle border */
    border-radius: 8px; /* Consistent rounded corners */
    overflow: hidden;
    position: relative;
    display: block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.thumbnail-item:hover {
    transform: scale(1.03); /* Slight scale up */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
.thumbnail-item img,
.thumbnail-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}
.thumbnail-item .video-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    color: rgba(255, 255, 255, 0.8);
    pointer-events: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Navigation Arrows */
.nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: white;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 10px 15px;
    border-radius: 10px;
    user-select: none;
    transition: opacity 0.3s ease;
    opacity: 0;
    z-index: 20;
}

#album-container:hover .nav-arrow {
    opacity: 0.7;
}

.nav-arrow:hover {
    opacity: 1 !important;
}

.nav-arrow.left {
    left: 20px;
}

.nav-arrow.right {
    right: 20px;
}

/* Settings Page Specific Styles */
.settings-page-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.settings-container { /* This will also have .glass-container */
    padding: 30px 40px;
    width: 90%;
    max-width: 400px;
}

.settings-page-h1 {
    text-align: center;
    margin-top: 0;
    font-weight: 300;
    color: var(--font-color); /* Use global font color */
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #aaa; /* Dim font color */
}

/* Primary Button Style */
.btn-primary {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background-color: var(--accent-color);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 20px; /* Specific to this context, might need to be adjusted */
}
.btn-primary:hover {
    background-color: color-mix(in srgb, var(--accent-color) 80%, black); /* Darker accent on hover */
}
.btn-primary:disabled {
    background-color: #555;
    cursor: not-allowed;
}

.button-group a { /* This should use .settings-link */
    display: inline-block;
    margin-left: 15px;
    /* .settings-link will override these, so no specific styling here */
}

#save-status {
    text-align: center;
    margin-top: 20px;
    color: var(--accent-color); /* Use accent color for success */
    opacity: 0;
    transition: opacity 0.5s;
}

/* Color Palette, Slider, and Select specific styles */
#color-palette {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping */
    gap: 10px;
    justify-content: center; /* Center swatches */
}
.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.color-swatch.selected {
    border-color: var(--accent-color);
    transform: scale(1.1);
}
.form-group input[type="range"] {
    width: calc(100% - 60px); /* Adjust width */
    vertical-align: middle;
    -webkit-appearance: none;
    background: transparent;
}
.form-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  border: none;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
  margin-top: -6px; /* Adjust this value to center the thumb vertically */
  box-shadow: 0 0 2px rgba(0,0,0,0.5);
}
.form-group input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}

#brightness-value {
    display: inline-block;
    width: 50px;
    text-align: right;
    color: #aaa;
    vertical-align: middle;
}

/* Contact Page Specific Styles */
.contact-page-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.contact-container { /* This will also have .glass-container */
    padding: 30px 40px;
    width: 90%;
    max-width: 500px;
}

.contact-page-h1 {
    text-align: center;
    margin-top: 0;
    font-weight: 300;
    color: var(--accent-color); /* Use accent color for headings */
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #aaa; /* Dim font color */
    font-size: 0.9em;
}

/* Button (explicitly for form submission) */
.contact-container button { /* This will be .btn-primary */
    margin-top: 20px;
}

#form-status {
    margin-top: 15px;
    text-align: center;
    color: var(--success-color, #28a745); /* Use accent or default success color */
    font-size: 0.9em;
}

