:root {
    --bg-color: #0B0D17;
    --card-bg: rgba(255, 255, 255, 0.05);
    --accent-blue: #4D79FF;
    --accent-gold: #FFD700;
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 100px;
    /* For floating button */
}

/* Header & User Profile Redesign */
.header {
    padding: 10px 0 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.header-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
}

.header-meta p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 700;
}

.header-hero {
    margin: 5px 0;
}

.header-hero h1 {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(135deg, #FFF 0%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Integrated Status Card */
.status-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.lv-badge {
    background: linear-gradient(135deg, var(--accent-blue), #8A2BE2);
    min-width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 4px 12px rgba(138, 43, 226, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-item-xp {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.xp-meta {
    display: flex;
    justify-content: space-between;
    align-items: end;
}

.xp-label {
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--accent-blue);
    letter-spacing: 1.2px;
    opacity: 0.8;
}

.xp-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
}

.status-item-streak {
    padding-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.xp-bar-outer {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.xp-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), #8A2BE2, var(--accent-blue));
    background-size: 200% 100%;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(77, 121, 255, 0.5);
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: gradientMove 3s linear infinite;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

/* Reward Progress Tracker */
.reward-tracker {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 25px;
    border: 1px solid var(--glass-border);
}

.tracker-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

#tracker-status {
    color: var(--accent-gold);
}

.tracker-bar-bg {
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    position: relative;
    overflow: visible;
    /* 마커 아이콘 보이기 위해 */
}

.tracker-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #CD7F32, #FFD700, #B721FF);
    border-radius: 6px;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.marker {
    position: absolute;
    top: -5px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transform: translateX(-50%);
    z-index: 5;
}

.marker::after {
    content: attr(data-label);
}

/* 마커 위치 */
.m-1 {
    left: 10%;
}

.m-3 {
    left: 30%;
}

.m-5 {
    left: 50%;
}

.m-10 {
    left: 100%;
}

.marker.achieved {
    filter: drop-shadow(0 0 5px var(--accent-gold));
    transform: translateX(-50%) scale(1.2);
}

.streak-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: var(--transition);
}

.streak-badge.inactive {
    opacity: 0.3;
    filter: grayscale(1);
}

.streak-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px rgba(255, 69, 0, 0.4));
}

.streak-count {
    font-size: 0.8rem;
    font-weight: 900;
    color: #FF4500;
}

.streak-badge.inactive .streak-count {
    color: var(--text-secondary);
}

@keyframes coldGlow {
    from {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.05);
    }

    to {
        box-shadow: 0 0 10px rgba(173, 216, 230, 0.2);
    }
}

.header-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.stats-icon-btn,
.settings-icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    transition: var(--transition);
}

.stats-icon-btn:active,
.settings-icon-btn:active {
    transform: scale(0.9);
}

/* Quest Section */
.section-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.quest-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quest-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    animation: fadeIn 0.5s ease-out backwards;
}

.quest-card:active {
    transform: scale(0.98);
}

.quest-info h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.quest-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.check-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1.5px solid var(--accent-blue);
    background: rgba(77, 121, 255, 0.05);
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition);
}

.check-btn:hover,
.check-btn.completed {
    background: var(--accent-blue);
    color: #FFF;
    box-shadow: 0 0 20px rgba(77, 121, 255, 0.4);
}

.quest-card-wrapper.completing {
    animation: popOut 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popOut {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

/* Floating Action Button (Pill Style) */
.fab {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent-blue), #8A2BE2);
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 30px;
    height: 56px;
    border-radius: 28px;
    font-size: 1.05rem;
    font-weight: 800;
    box-shadow: 0 15px 35px rgba(77, 121, 255, 0.5);
    cursor: pointer;
    z-index: 100;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
    animation: fabPulse 2s infinite;
}

.fab-text {
    white-space: nowrap;
}

.fab ion-icon {
    font-size: 1.6rem;
}

.fab:hover {
    transform: translateX(-50%) scale(1.05) translateY(-5px);
    box-shadow: 0 20px 45px rgba(77, 121, 255, 0.6);
}

.fab:active {
    transform: translateX(-50%) scale(0.95);
}

@keyframes fabPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(77, 121, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(77, 121, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(77, 121, 255, 0);
    }
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #1A1D29;
    width: 90%;
    max-width: 400px;
    border-radius: 24px;
    padding: 30px;
    border: 1px solid var(--glass-border);
    animation: slideUp 0.3s ease-out;
}

.modal-content h2 {
    margin-bottom: 20px;
}

input,
textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    margin-bottom: 20px;
    font-size: 1rem;
}

.btn {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 0.9;
        transform: scale(1.1);
    }

    80% {
        opacity: 1;
        transform: scale(0.89);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes levelUpGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(77, 121, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(77, 121, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(77, 121, 255, 0);
    }
}

.level-up-anim {
    animation: levelUpGlow 1.5s ease-out infinite;
}

/* Success Effect Layout */
#success-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(11, 13, 23, 0.9);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.success-content {
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-icon {
    font-size: 5rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

.success-quote {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.success-desc {
    color: var(--text-secondary);
}

/* Lucky Hit Effect */
#success-overlay.lucky-hit {
    background: radial-gradient(circle, rgba(255, 215, 0, 0.15) 0%, rgba(11, 13, 23, 0.95) 70%);
}

#success-overlay.lucky-hit .success-icon {
    color: #FFD700;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
    animation: luckyPulse 1s infinite alternate;
}

#success-overlay.lucky-hit .success-quote {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

@keyframes luckyPulse {
    from {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    }

    to {
        transform: scale(1.1);
        filter: drop-shadow(0 0 30px rgba(255, 215, 0, 1));
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Onboarding Screen */
.onboarding {
    position: fixed;
    inset: 0;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: 20px;
}

.onboarding-content {
    text-align: center;
    max-width: 350px;
    animation: fadeIn 0.8s ease-out;
}

.onboarding-icon {
    font-size: 4rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.onboarding h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #FFF 0%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.onboarding-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
    line-height: 1.8;
}

.onboarding-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.onboarding-form label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.onboarding-form input {
    text-align: center;
    font-size: 1.2rem;
    padding: 16px;
    margin-bottom: 10px;
}

.btn-start {
    margin-top: 10px;
    padding: 18px;
    font-size: 1.1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state ion-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Header greeting animation */
#greeting-message {
    font-size: 1.8rem;
    line-height: 1.3;
}

/* Section Title with icon */
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title ion-icon {
    font-size: 1.2rem;
}

.quest-count {
    background: var(--accent-blue);
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 5px;
}

/* Completed Section */
.completed-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.section-title-toggle {
    cursor: pointer;
    user-select: none;
}

.toggle-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.toggle-icon.rotated {
    transform: rotate(180deg);
}

#completed-list {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

#completed-list.collapsed {
    max-height: 0;
    opacity: 0;
}

/* Completed quest card style */
.quest-card.completed-card {
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.02);
}

.quest-card.completed-card h3 {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.quest-card.completed-card .check-btn {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: #1A1D29;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

/* Custom Time Picker */
.time-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: block;
}

.time-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.time-btn {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.time-btn:hover {
    border-color: var(--accent-blue);
}

.time-btn.selected {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

/* Cancel button style */
.btn-cancel {
    background: transparent;
    color: #ff6b6b;
    margin-top: 10px;
}

.btn-cancel:hover {
    background: rgba(255, 107, 107, 0.1);
}

/* Swipe to Delete Refined V2 */
.quest-card-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    margin-bottom: 12px;
    background: transparent;
}

.quest-card-inner {
    display: flex;
    width: 100%;
    position: relative;
    z-index: 2;
    background: #161922;
    /* 배경색 고정 */
    border-radius: 20px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 밀었을 때 이동 거리 단축 */
.quest-card-inner.swiped {
    transform: translateX(-60px);
}

.quest-card {
    width: 100%;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delete-btn {
    position: absolute;
    right: 8px;
    /* 안쪽으로 좀 더 들어옴 */
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    /* 더 작게 수정 */
    height: 45px;
    /* 정사각 느낌 */
    background: #ff4d4d;
    display: none;
    /* 평소에는 아예 안 보임 */
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    cursor: pointer;
    border: none;
    border-radius: 12px;
    z-index: 1;
}

/* 스와이프 되었을 때만 display: flex로 변경 */
.quest-card-wrapper.show-delete .delete-btn {
    display: flex;
}


.delete-btn:active {
    background: #cc3d3d;
}

/* Stats Modal */
.stats-content {
    text-align: center;
}

.stats-content h2 {
    margin-bottom: 25px;
}

.stats-summary {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-success {
    color: var(--accent-gold);
}

.stat-rate {
    color: var(--accent-blue);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.stats-chart {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 120px;
    padding: 10px 0;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--glass-border);
}

.chart-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.bar {
    width: 30px;
    background: var(--accent-blue);
    border-radius: 5px 5px 0 0;
    min-height: 5px;
    transition: height 0.5s ease;
}

.bar.empty {
    background: var(--card-bg);
}

.chart-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.version-info {
    margin-top: -10px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.6;
}

.update-link {
    background: none;
    border: none;
    color: var(--accent-blue);
    text-decoration: underline;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
}


/* Treasury Chest Overlay */
#special-chest-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(11, 13, 23, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease-out;
}

.chest-content {
    text-align: center;
    padding: 40px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 32px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    max-width: 320px;
    animation: scaleIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chest-icon {
    font-size: 6rem;
    margin-bottom: 20px;
    display: block;
    animation: float 2s infinite ease-in-out;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chest-content h2 {
    color: #FFD700;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.chest-content p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.xp-popup-anim {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 900;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    pointer-events: none;
    animation: xpFlyUp 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    z-index: 10;
}

@keyframes xpFlyUp {
    0% {
        opacity: 0;
        transform: translate(-50%, -20%) scale(0.5);
    }

    20% {
        opacity: 1;
        transform: translate(-50%, -80%) scale(1.2);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -200%) scale(1);
    }
}

.chest-icon.shaking {
    animation: shake 0.5s ease-in-out infinite;
}

@keyframes shake {

    0%,
    100% {
        transform: rotate(0);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

.chest-icon.opened {
    animation: popRotate 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popRotate {
    0% {
        transform: scale(1) rotate(0);
    }

    50% {
        transform: scale(1.8) rotate(15deg);
    }

    100% {
        transform: scale(1.5) rotate(0);
    }
}

/* Goal Setting Modal */
.goal-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(11, 13, 23, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(15px);
    animation: fadeIn 0.8s ease-out;
}

.goal-modal-content {
    text-align: center;
    padding: 40px 30px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border-radius: 32px;
    border: 1px solid var(--glass-border);
    max-width: 350px;
    width: 90%;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glow-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px var(--accent-blue));
    animation: pulse 2s infinite;
}

.goal-modal-content h2 {
    margin-bottom: 10px;
    font-size: 1.8rem;
    background: linear-gradient(135deg, #FFF, var(--accent-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.goal-modal-content p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.goal-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.goal-options button {
    padding: 18px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.goal-options button:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(77, 121, 255, 0.3);
}

.goal-options button:active {
    transform: translateY(0);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 12px 0;
    /* 고정 높이 대신 상하 패딩으로 조절 */
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    /* 아이폰 Safe Area 확보 */
    background: rgba(11, 13, 23, 0.9);
    backdrop-filter: blur(25px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    padding: 10px;
    flex: 1;
}

.nav-item ion-icon {
    font-size: 1.5rem;
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 600;
}

.nav-item.active {
    color: var(--accent-blue);
}

/* Album Dogam System */
.album-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 20px;
}

.date-selector {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
}

.date-selector::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.date-chip {
    flex: 0 0 auto;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.date-chip.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
    box-shadow: 0 5px 15px rgba(77, 121, 255, 0.3);
    transform: translateY(-2px);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding-bottom: 20px;
}

.album-card {
    background: linear-gradient(145deg, rgba(30, 35, 55, 0.95), rgba(11, 13, 23, 0.98));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    aspect-ratio: 1 / 1.3;
}

.album-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.album-card .card-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.album-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
}

.album-card .card-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Card Detail Modal (Zoom) */
.card-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 2500;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    animation: fadeIn 0.4s ease-out;
}

.card-detail-content {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 3 / 4.5;
    background: linear-gradient(135deg, #1A1D29, #0B0D17);
    border-radius: 32px;
    border: 2px solid var(--accent-blue);
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    box-shadow: 0 0 50px rgba(77, 121, 255, 0.3);
    animation: cardZoomIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-detail-icon {
    font-size: 6rem;
    margin-bottom: 30px;
    animation: float 3s infinite ease-in-out;
}

.card-detail-quote {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #FFF, var(--accent-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-collected-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
    opacity: 0.8;
}

.card-detail-desc {
    color: #FFF;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
}

@keyframes cardZoomIn {
    from {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }

    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.album-empty {
    text-align: center;
    margin-top: 100px;
    color: var(--text-secondary);
}

.album-empty ion-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 10px;
}

/* Button styles moved to general header section */

/* Settings Modal Specifics */
.settings-content {
    max-width: 360px !important;
}

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

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 15px;
}

.settings-info h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
    color: white;
}

.settings-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.btn-reset {
    background: rgba(255, 77, 77, 0.1);
    color: #FF4D4D;
    border: 1px solid rgba(255, 77, 77, 0.3);
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-reset:active {
    background: rgba(255, 77, 77, 0.2);
}

.btn-update-small {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--glass-border);
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-update-small:active {
    background: rgba(255, 255, 255, 0.1);
}

/* Safe area for iOS */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .container {
        padding-bottom: calc(120px + env(safe-area-inset-bottom));
    }

    .fab {
        bottom: calc(95px + env(safe-area-inset-bottom));
    }
}