/* ===== CSS 변수 (테마) ===== */
:root {
    /* 라이트 모드 (기본) */
    --bg-color: #e0e5ec;
    --text-color: #2d3436;
    --text-secondary: #636e72;
    --shadow-light: #ffffff;
    --shadow-dark: #a3b1c6;
    --accent-color: #6c5ce7;
    --accent-hover: #5b4cdb;

    /* 뉴모피즘 그림자 */
    --neu-shadow-extruded: 4px 4px 8px rgba(163, 177, 198, 0.4),
        -4px -4px 8px rgba(255, 255, 255, 0.7);
    --neu-shadow-inset: inset 2px 2px 4px rgba(163, 177, 198, 0.35),
        inset -2px -2px 4px rgba(255, 255, 255, 0.6);
    --neu-shadow-small: 2px 2px 4px rgba(163, 177, 198, 0.35),
        -2px -2px 4px rgba(255, 255, 255, 0.6);
    --neu-shadow-flat: 0 0 0 transparent;

    /* 전환 효과 */
    --transition: all 0.3s ease;
}

/* 다크 모드 */
[data-theme="dark"] {
    --bg-color: #2d3436;
    --text-color: #dfe6e9;
    --text-secondary: #b2bec3;
    --shadow-light: #3d4447;
    --shadow-dark: #1d2426;
    --accent-color: #a29bfe;
    --accent-hover: #6c5ce7;

    --neu-shadow-extruded: 4px 4px 8px rgba(20, 25, 26, 0.5),
        -4px -4px 8px rgba(61, 68, 71, 0.4);
    --neu-shadow-inset: inset 2px 2px 4px rgba(20, 25, 26, 0.4),
        inset -2px -2px 4px rgba(61, 68, 71, 0.3);
    --neu-shadow-small: 2px 2px 4px rgba(20, 25, 26, 0.4),
        -2px -2px 4px rgba(61, 68, 71, 0.3);
}

/* ===== 기본 스타일 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    transition: var(--transition);
    font-weight: 400;
    line-height: 1.6;
}

/* ===== 헤더 ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

/* 헤더 날씨 위젯 */
.header-weather {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
    padding: 0 20px;
    background-color: var(--bg-color);
    border-radius: 12px;
    box-shadow: var(--neu-shadow-small);
    transition: var(--transition);
    cursor: pointer;
    height: 48px;
}

.header-weather:hover {
    box-shadow: var(--neu-shadow-extruded);
    transform: translateY(-1px);
}

.header-weather .weather-icon {
    font-size: 1.4rem;
}

.header-weather .weather-temp {
    font-weight: 700;
}

.header-weather .weather-city {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* 헤더 우측 그룹 */
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ===== 뉴모피즘 버튼 ===== */
.neu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: var(--bg-color);
    border: none;
    border-radius: 12px;
    box-shadow: var(--neu-shadow-small);
    cursor: pointer;
    color: var(--text-color);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    height: 48px;
}

.neu-btn:hover {
    box-shadow: var(--neu-shadow-extruded);
}

.neu-btn:active {
    box-shadow: var(--neu-shadow-inset);
}

.neu-btn .material-symbols-outlined {
    font-size: 20px;
}

.settings-btn {
    padding: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    justify-content: center;
}

.settings-btn:hover .material-symbols-outlined {
    animation: rotate 0.5s ease;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(90deg);
    }
}

/* ===== 다크모드 토글 ===== */
.theme-toggle {
    position: relative;
    height: 48px;
    display: flex;
    align-items: center;
}

.theme-switch {
    display: none;
}

.toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 80px;
    height: 40px;
    background-color: var(--bg-color);
    border-radius: 30px;
    padding: 5px;
    cursor: pointer;
    box-shadow: var(--neu-shadow-inset);
    position: relative;
    transition: var(--transition);
}

.toggle-label .material-symbols-outlined {
    font-size: 18px;
    z-index: 1;
    transition: var(--transition);
}

.sun-icon {
    color: #f39c12;
    margin-left: 4px;
}

.moon-icon {
    color: var(--text-secondary);
    margin-right: 4px;
}

.toggle-ball {
    position: absolute;
    width: 32px;
    height: 32px;
    background-color: var(--bg-color);
    border-radius: 50%;
    box-shadow: var(--neu-shadow-small);
    left: 4px;
    transition: var(--transition);
}

.theme-switch:checked+.toggle-label .toggle-ball {
    left: calc(100% - 36px);
}

.theme-switch:checked+.toggle-label .sun-icon {
    color: var(--text-secondary);
}

.theme-switch:checked+.toggle-label .moon-icon {
    color: #f1c40f;
}

/* ===== 메인 컨텐츠 ===== */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 120px 20px 40px;
    max-width: 900px;
    /* 900px 확장 */
    margin: 0 auto;
}

.search-container {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.greeting {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
    letter-spacing: -0.5px;
    line-height: 1.5;
    word-break: keep-all;
    text-wrap: balance;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5), -1px -1px 1px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .greeting {
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.1), -1px -1px 1px rgba(0, 0, 0, 0.3);
}

/* ===== 검색창 (분리형) ===== */
.search-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    /* 간격 15px */
    width: 100%;
    margin-bottom: 30px;
}

.search-input-box {
    flex-grow: 1;
    /* 꽉 채우기 */
    display: flex;
    align-items: center;
    padding: 14px 24px;
    border-radius: 30px;
    background-color: var(--bg-color);
    box-shadow: var(--neu-shadow-inset);
    gap: 12px;
    transition: var(--transition);
    border: 2px solid transparent;
}

.search-input-box:focus-within {
    border-color: rgba(108, 92, 231, 0.1);
}

.search-icon {
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-color);
    outline: none;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

/* 마이크 버튼 (Extruded - 원형) */
.voice-btn-extruded {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    background-color: var(--bg-color);
    border: none;
    border-radius: 50%;
    /* 완전한 원형 */
    cursor: pointer;
    box-shadow: var(--neu-shadow-extruded);
    transition: var(--transition);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.voice-btn-extruded:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.voice-btn-extruded:active {
    box-shadow: var(--neu-shadow-inset);
    transform: translateY(0);
}

.voice-btn-extruded .material-symbols-outlined {
    font-size: 24px;
}

.voice-btn-extruded.listening {
    color: #e74c3c;
    box-shadow: var(--neu-shadow-inset);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

/* =====/* 뉴스 위젯 컨테이너 */
.news-widget-container {
    width: 100%;
    /* 너비 복구 (800px or 100%) */
    height: 100%;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--neu-shadow-extruded);
    /* Extruded */
    overflow: hidden;
}

/* 뉴스 헤더 (탭 + 설정 버튼) */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

/* 탭 래퍼 (버튼 포함) */
.news-tabs-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
    overflow: hidden;
    /* 버튼 밖으로 나가는 것 방지 */
}

/* 탭 컨테이너 (가로 스크롤) */
.news-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-grow: 1;
    scroll-behavior: smooth;
    /* 부드러운 스크롤 */
    mask-image: linear-gradient(to right, transparent, black 20px, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 20px, black 90%, transparent);
    padding: 0 10px;
    /* 마스크 영역 확보 */
}

.news-tabs::-webkit-scrollbar {
    display: none;
}

/* 탭 스크롤 버튼 (가시성 확보 - Extruded 디자인) */
.news-tabs-wrapper .tab-scroll-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background-color: var(--bg-color) !important;
    /* 배경색 강제 (테마 색상) */
    box-shadow: var(--neu-shadow-extruded) !important;
    /* 그림자 강제 (입체감) */
    color: #555555 !important;
    /* 라이트 모드 기본 색상 */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-size: 1rem;
    opacity: 1 !important;
    /* 투명도 제거 */
    margin: 0 4px;
    /* 버튼과 탭 사이 간격 확보 */
    z-index: 100 !important;
    /* 최상단 배치 */
}

/* 아이콘 색상 */
.news-tabs-wrapper .tab-scroll-btn span {
    color: inherit !important;
}

/* 다크 모드 색상 오버라이드 */
[data-theme="dark"] .news-tabs-wrapper .tab-scroll-btn {
    color: #e0e0e0 !important;
    /* 다크 모드 아이콘 밝은 회색 */
    background-color: var(--bg-color) !important;
    /* 다크 모드 배경 */
}

/* 호버 효과 */
.news-tabs-wrapper .tab-scroll-btn:hover {
    color: var(--accent-color) !important;
    transform: scale(1.1);
}

/* 클릭(Active) 효과 - 눌린 느낌 */
.news-tabs-wrapper .tab-scroll-btn:active {
    box-shadow: var(--neu-shadow-inset) !important;
    /* Inset Shadow로 변경 */
    transform: scale(0.95);
}

/* 숨겨진 상태 (완전히 제거) */
.tab-scroll-btn.hidden {
    opacity: 0 !important;
    pointer-events: none;
    width: 0 !important;
    height: 0 !important;
    /* 높이도 제거 */
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

/* ... (기존 탭 버튼 스타일 유지) ... */
.news-tab {
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    background-color: var(--bg-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.news-tab:hover {
    color: var(--text-color);
    transform: translateY(-1px);
}

.news-tab.active {
    color: var(--accent-color);
    box-shadow: var(--neu-shadow-inset);
}

/* 뉴스 설정 버튼 - 강제 적용 */
.news-header .news-settings-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background-color: var(--bg-color);
    box-shadow: var(--neu-shadow-extruded);
    color: var(--text-color) !important;
    /* 강제 적용 */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.news-header .news-settings-btn span {
    color: var(--text-color) !important;
    /* 아이콘 강제 적용 */
}

.news-header .news-settings-btn:hover {
    color: var(--accent-color) !important;
    transform: scale(1.05);
}

.news-header .news-settings-btn:hover span {
    color: var(--accent-color) !important;
}

.news-header .news-settings-btn:active {
    box-shadow: var(--neu-shadow-inset);
    transform: scale(0.95);
}

/* 뉴스 목록 래퍼 (스크롤 영역) */
.news-list-wrapper {
    flex: 1;
    max-height: 250px;
    /* 높이 제한 */
    overflow-y: auto;
    padding-right: 6px;
}

.news-list-wrapper::-webkit-scrollbar {
    width: 6px;
}

.news-list-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.news-list-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

[data-theme="dark"] .news-list-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

.news-list-simple {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-item-simple {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 12px 0;
    width: 100%;
    overflow: hidden;
}

[data-theme="dark"] .news-item-simple {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.news-item-simple:last-child {
    border-bottom: none;
}

.news-link-simple {
    text-decoration: none;
    color: inherit;
    /* 한 줄 배치 핵심 */
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.news-title-text {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-color);
    flex: 1;
    /* 남은 공간 차지 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.news-date-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    margin-top: 0;
    flex-shrink: 0;
}

.news-loading-simple {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    gap: 10px;
}

/* ===== To-Do List ===== */
.todo-section {
    width: 100%;
    max-width: 100%;
    /* 부모 너비에 꽉 차게 */
    margin-bottom: 40px;
}

.todo-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 16px;
}

.todo-title .material-symbols-outlined {
    font-size: 24px;
    color: var(--accent-color);
}

.todo-login-required {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px;
    background-color: var(--bg-color);
    border-radius: 16px;
    box-shadow: var(--neu-shadow-inset);
    color: var(--text-secondary);
}

.todo-login-required.hidden {
    display: none;
}

/* =========================================
   To-Do Header Button & Popup
   ========================================= */

/* Header Left Group */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Header To-Do Button */
.header-todo-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background-color: var(--bg-color);
    box-shadow: var(--neu-shadow-extruded);
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.header-todo-btn:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.header-todo-btn:active {
    box-shadow: var(--neu-shadow-inset);
    transform: translateY(0);
}

/* To-Do Popup Container (Dropdown Style) */
.todo-popup-container {
    position: fixed;
    top: 80px;
    /* 헤더 높이 아래 */
    left: 20px;
    /* 왼쪽 정렬 */
    width: 380px;
    max-height: 500px;
    background-color: var(--bg-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--neu-shadow-extruded);
    z-index: 999;

    transform-origin: top left;
    /* 위에서 아래로 펼쳐짐 */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* 초기 상태: 숨김 */
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9) translateY(-20px);
}

.todo-popup-container.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

/* To-Do Header in Popup */
.todo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.todo-title {
    margin-bottom: 0;
    /* 기존 마진 제거 */
    font-size: 1.2rem;
}

.close-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-color);
}

/* =========================================
   Responsive Adjustments (Mobile Bottom Sheet)
   ========================================= */
@media (max-width: 768px) {
    .todo-popup-container {
        top: auto;
        /* 상단 위치 해제 */
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        /* 위쪽만 둥글게 */
        max-height: 80vh;
        /* 화면 80% */
        transform-origin: bottom center;
        transform: translateY(100%);
        /* 아래로 숨김 */
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
    }

    .todo-popup-container.active {
        transform: translateY(0);
    }

    .news-widget-container {
        padding: 16px;
    }

    .inspiration-card {
        width: 240px;
        height: 320px;
    }
}

.todo-input-wrapper {
    display: none;
    align-items: center;
    padding: 14px 18px;
    border-radius: 12px;
    gap: 12px;
    margin-bottom: 20px;
    background-color: var(--bg-color);
    box-shadow: var(--neu-shadow-inset);
}

.todo-input-wrapper.visible {
    display: flex;
}

.todo-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-color);
    outline: none;
}

.todo-input::placeholder {
    color: var(--text-secondary);
}

.todo-submit-btn-large {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--bg-color);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: var(--neu-shadow-extruded);
    color: var(--accent-color);
}

.todo-submit-btn-large:active {
    box-shadow: var(--neu-shadow-inset);
}

.todo-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 날짜 선택기 트리거 (시계 아이콘) */
.todo-due-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.todo-due-trigger:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--accent-color);
}

[data-theme="dark"] .todo-due-trigger:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 실제 날짜 입력창 (투명하게 만들어서 아이콘 위에 덮어씀) */
.todo-due-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

/* 브라우저 기본 달력 아이콘 커스텀 (Chrome/Edge/Safari) */
.todo-due-input::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}


.todo-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background-color: var(--bg-color);
    border-radius: 12px;
    box-shadow: var(--neu-shadow-small);
    gap: 12px;
    transition: var(--transition);
}

.todo-item.completed {
    box-shadow: var(--neu-shadow-inset);
    opacity: 0.7;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.todo-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
}

.todo-btn:hover {
    color: #e74c3c;
}

/* ===== 모달 ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    /* 딤드 처리 */
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 기존 모달 스타일 제거됨 -> 아래에 새로 정의 */

/* 주간 예보 모달 리스트 */
.forecast-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.forecast-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .forecast-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.forecast-item:last-child {
    border-bottom: none;
}

.forecast-date {
    width: 60px;
    font-weight: 500;
}

.forecast-weather {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.forecast-temp {
    width: 80px;
    text-align: right;
    font-weight: 600;
}

.forecast-temp .max {
    color: #e74c3c;
}

.forecast-temp .min {
    color: #3498db;
}

.forecast-temp .separator {
    margin: 0 4px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* 로그인 모달 */
.login-modal {
    max-width: 400px;
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.neu-input-wrapper {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--bg-color);
    box-shadow: var(--neu-shadow-inset);
    gap: 10px;
}

.neu-input-wrapper input {
    border: none;
    background: transparent;
    flex: 1;
    outline: none;
    color: var(--text-color);
}

/* 자동 로그인 체크박스 */
.auto-login-wrapper {
    margin-bottom: 20px;
    padding: 0 4px;
}

.neu-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.neu-checkbox input {
    display: none;
}

.neu-checkbox .checkmark {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background-color: var(--bg-color);
    box-shadow: var(--neu-shadow-extruded);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 0.2s ease;
}

.neu-checkbox input:checked+.checkmark {
    box-shadow: var(--neu-shadow-inset);
    color: var(--accent-color);
}

.neu-checkbox .checkmark .material-symbols-outlined {
    font-size: 16px;
    font-weight: bold;
}

.neu-checkbox .label-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: var(--bg-color);
    color: var(--accent-color);
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--neu-shadow-extruded);
    margin-top: 10px;
}

.auth-submit-btn:active {
    box-shadow: var(--neu-shadow-inset);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .main-content {
        padding-top: 100px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .header {
        padding: 10px 20px;
    }

    .header-weather {
        padding: 0 12px;
        font-size: 0.85rem;
        height: 40px;
    }

    .header-weather .weather-icon {
        font-size: 1.2rem;
    }

    .neu-btn {
        padding: 8px 12px;
        height: 40px;
    }

    .settings-btn {
        width: 40px;
        height: 40px;
    }

    .greeting {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .search-wrapper {
        gap: 10px;
        flex-direction: row;
    }

    .voice-btn-extruded {
        width: 48px;
        height: 48px;
    }

    .search-input-box {
        padding: 12px 16px;
    }

    /* 모바일에서 날씨 도시명 숨기기 */
    .header-weather .weather-city {
        display: none;
    }

    .header-right {
        gap: 10px;
    }

    .neu-btn .btn-text {
        display: none;
    }

    /* 모바일 반응형 끝부분 */
}

/* =========================================
   High-Quality Neumorphism Modal Design
   (사용자 요청에 따른 전면 수정)
   ========================================= */

/* 1. 모달 컨테이너 (.modal-content) */
.modal {
    background-color: var(--bg-color);
    /* Off-white (#e0e5ec) */
    padding: 40px;
    /* 넉넉한 여백 */
    border-radius: 20px;
    box-shadow: var(--neu-shadow-extruded);
    /* Extruded Effect */
    width: 90%;
    max-width: 480px;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    /* 쫀득한 느낌 */
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.4);
    /* 미세한 경계선 */
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

/* 2. 모달 헤더 & 닫기 버튼 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    /* 간격 확장 */
}

.modal-header h2 {
    font-size: 1.5rem;
    /* 폰트 키움 */
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.5px;
}

.modal-close {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-color);
    box-shadow: var(--neu-shadow-extruded);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.modal-close:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.modal-close:active {
    box-shadow: var(--neu-shadow-inset);
    transform: translateY(0);
}

/* 3. 설정 항목 레이아웃 */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    /* 간격 20px 이상 */
    padding: 0 5px;
    /* 시각적 보정 */
}

.setting-item.name-setting {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.setting-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

/* 4. 체크박스 -> 토글 스위치 (.neu-toggle-small) */
.neu-toggle-small {
    position: relative;
    width: 60px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.neu-toggle-small input {
    display: none;
    /* 기본 체크박스 숨김 */
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-color);
    border-radius: 30px;
    box-shadow: var(--neu-shadow-extruded);
    /* OFF 상태: 튀어나옴 */
    transition: all 0.3s ease;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: var(--text-secondary);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

/* ON 상태: 눌린 효과 + 불 들어옴 */
.neu-toggle-small input:checked+.toggle-slider {
    box-shadow: var(--neu-shadow-inset);
    /* 눌린 효과 */
}

.neu-toggle-small input:checked+.toggle-slider:before {
    transform: translateX(30px);
    background-color: var(--accent-color);
    /* 포인트 컬러 */
    box-shadow: none;
}

/* 5. 닉네임 입력 그룹 */
.name-input-group {
    display: flex;
    width: 100%;
    gap: 15px;
}

.neu-text-input {
    flex: 1;
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    background: var(--bg-color);
    box-shadow: var(--neu-shadow-inset);
    /* 오목한 효과 */
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.neu-text-input:focus {
    box-shadow: inset 3px 3px 6px #b8b9be, inset -3px -3px 6px #fff;
    /* 더 깊은 느낌 */
}

/* 저장 버튼 (아이콘) */
.save-name-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    /* 둥근 사각형 */
    background: var(--bg-color);
    box-shadow: var(--neu-shadow-extruded);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--accent-color);
    transition: all 0.2s ease;
}

/* =========================================
   Custom Date/Time Picker Styles
   ========================================= */

.datetime-modal {
    max-width: 380px;
}

/* 달력 헤더 */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.current-month-year {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
}

.neu-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-color);
    box-shadow: var(--neu-shadow-small);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.neu-btn-icon:hover {
    box-shadow: var(--neu-shadow-extruded);
    color: var(--accent-color);
}

.neu-btn-icon:active {
    box-shadow: var(--neu-shadow-inset);
}

/* 요일 헤더 */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.calendar-weekdays .sunday {
    color: #e74c3c;
}

.calendar-weekdays .saturday {
    color: #3498db;
}

/* 날짜 그리드 */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

.calendar-day {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 0.95rem;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.2s ease;
    /* 기본 상태: 평면 (그림자 없음 or 아주 약한 그림자) */
}

.calendar-day:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .calendar-day:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.calendar-day.selected {
    background-color: var(--bg-color);
    box-shadow: var(--neu-shadow-inset);
    color: var(--accent-color);
    font-weight: 700;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.calendar-day.today {
    color: var(--accent-color);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.calendar-day.other-month {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* 시간 선택 */
/* 시간 선택 (iOS Style Scrolling Picker) */
/* 시간 선택 (iOS Style Scrolling Picker) */
.time-picker-container {
    position: relative;
    background-color: var(--bg-color);
    border-radius: 16px;
    height: 160px;
    /* 높이 1.5배 확보 */
    box-shadow: var(--neu-shadow-inset);
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    /* 컬럼 간 간격 */
    overflow: hidden;
    /* 영역 밖 숨김 */
    padding: 0 10px;
}

.time-scroll-wrapper {
    display: flex;
    width: 100%;
    justify-content: space-around;
    position: relative;
    z-index: 2;
}

.time-column {
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}

/* =========================================
   Main Layout (Single Column & Immersive - CLEAN)
   ========================================= */

.main-content {
    width: 100%;
    max-width: 900px;
    /* 중앙 정렬 기준 너비 */
    margin: 0 auto;
    padding: 100px 20px 50px 20px;
    /* 헤더 겹침 방지 + 하단 여백 */
    display: flex;
    flex-direction: column;
    gap: 40px;
    /* 위젯 간 간격 */
    align-items: center;
    /* 자식 요소 중앙 정렬 */
}

/* 모든 메인 자식 요소는 너비 100% (max-width 900px 안에서) */
.search-container,
.news-widget-wrapper,
.inspiration-section {
    width: 100%;
    max-width: 100%;
}

/* =========================================
   Search Section (Fixed Alignment)
   ========================================= */
.search-container {
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    /* 입력창과 버튼 사이 간격 */
    position: relative;
    /* search-input-box와 voice-btn이 flex item으로 존재 */
}

/* 검색 입력 박스 (아이콘 + 인풋) */
.search-input-box {
    flex-grow: 1;
    /* 남은 공간 모두 차지 */
    height: 50px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-radius: 25px;
    /* 둥근 모서리 */
    background-color: var(--bg-color);
    box-shadow: var(--neu-shadow-inset);
}

.search-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    height: 100%;
    margin-left: 10px;
    font-size: 1rem;
    color: var(--text-color);
}

.search-input:focus {
    outline: none;
}

/* 음성 검색 버튼 (원형) */
.voice-btn-extruded {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex-shrink: 0;
    /* 크기 줄어듦 방지 */
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background-color: var(--bg-color);
    box-shadow: var(--neu-shadow-extruded);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.voice-btn-extruded:hover {
    color: var(--accent-color);
    transform: scale(1.05);
}

/* =========================================
   News Widget (Centralized)
   ========================================= */
.news-widget-wrapper {
    display: flex;
    justify-content: center;
}

.news-widget-container {
    width: 100%;
    height: auto;
    /* max-width는 상위 .main-content가 제어하므로 100% */
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--neu-shadow-extruded);
    overflow: hidden;
}

/* =========================================
   Inspiration Carousel (Horizontal Scroll & Card Fix)
   ========================================= */

.inspiration-section {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* 헤더와 캐러셀 간격 */
}

.inspiration-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
}

.inspiration-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    /* 가로 스크롤 필수 */
    padding: 10px 10px 30px 10px;
    /* 그림자 잘림 방지 */
    scroll-behavior: smooth;
    width: 100%;

    /* 스크롤바 코스메틱 */
    scrollbar-width: thin;
    scrollbar-color: var(--text-secondary) transparent;
}

.inspiration-carousel::-webkit-scrollbar {
    height: 6px;
}

.inspiration-carousel::-webkit-scrollbar-thumb {
    background-color: var(--text-secondary);
    border-radius: 3px;
    opacity: 0.3;
}

/* 개별 영감 카드 (Carousel Item) */
.inspiration-card {
    flex: 0 0 auto;
    /* ★ 중요: 크기 줄어들지 않음 ★ */
    min-width: 260px;
    /* ★ 중요: 최소 너비 보장 ★ */
    width: 260px;
    height: 340px;
    /* 약간 줄여서 비율 조정 */
    border-radius: 25px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* 텍스트 아래로 */
    background: linear-gradient(135deg, #a8c0ff, #3f2b96);
    /* 기본 */
    color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.inspiration-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* 텍스트 스타일 */
.inspiration-card .card-tag {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.inspiration-card .card-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
    word-break: keep-all;
}

.inspiration-card .card-desc {
    font-size: 0.9rem;
    opacity: 0.9;
    /* 말줄임 처리 (3줄) */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}

.card-link-btn {
    display: inline-block;
    background-color: white;
    color: #6c5ce7;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    align-self: flex-start;
}

.card-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.card-link-btn:active {
    transform: scale(0.95);
}

/* 다크 모드에서의 카드 그림자 조정 */
[data-theme="dark"] .inspiration-card {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

/* 활성 상태 (중앙) */
.time-item.active {
    opacity: 1;
    color: var(--accent-color);
    font-weight: 700;
    transform: scale(1.2);
}

/* 중앙 하이라이트 바 (선택 영역 배경 효과) */
.picker-selection-bar {
    position: absolute;
    top: 50%;
    left: 10px;
    right: 10px;
    height: 40px;
    transform: translateY(-50%);
    background: transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    pointer-events: none;
    /* 클릭 통과 */
    z-index: 1;
}

[data-theme="dark"] .picker-selection-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.full-width {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

.save-name-btn:active {
    box-shadow: var(--neu-shadow-inset);
    transform: scale(0.95);
}

.save-name-btn .material-symbols-outlined {
    font-size: 1.4rem;
    /* 아이콘 키움 */
}

/* 6. 검색 엔진 선택 (Custom Select) */
.neu-select {
    appearance: none;
    /* 기본 스타일 제거 */
    -webkit-appearance: none;
    padding: 10px 40px 10px 20px;
    /* 화살표 공간 확보 */
    border-radius: 12px;
    border: none;
    background: var(--bg-color);
    box-shadow: var(--neu-shadow-inset);
    /* 오목한 박스 */
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23555%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 10px auto;
    min-width: 120px;
}

[data-theme="dark"] .neu-select {
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
}

.neu-select:focus {
    box-shadow: var(--neu-shadow-inset), 0 0 0 2px rgba(52, 152, 219, 0.3);
}