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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 15px;
    line-height: 1.6;
    
    /* 성능 최적화 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    
    /* 스크롤 성능 개선 */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* 스크린 리더 전용 텍스트 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    backdrop-filter: blur(10px);
    
    /* 성능 최적화 */
    will-change: transform;
    transform: translateZ(0);
}

/* 모바일 터치 최적화 */
@media (hover: none) and (pointer: coarse) {
    /* 터치 디바이스에서 hover 효과 제거 */
    .bucket-item:hover,
    .profile-card:hover,
    .gallery-item:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    
    /* 터치 영역 최적화 (iOS 권장 44px) */
    .btn, 
    .filter-btn, 
    .profile-card,
    .nav-tab,
    .upload-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .header-btn {
        min-height: 40px;
        min-width: 40px;
    }
    
    .btn-small {
        min-height: 36px;
        min-width: 36px;
    }
    
    /* 터치 피드백 개선 */
    .btn:active,
    .filter-btn:active,
    .profile-card:active {
        background-color: rgba(0, 0, 0, 0.1);
        transform: scale(0.98);
    }
    
    /* 스크롤 영역 터치 개선 */
    .bucket-list,
    .gallery-grid,
    .profile-options {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

/* 스크롤 성능 개선 */
.bucket-list, .gallery-grid {
    -webkit-overflow-scrolling: touch;
    contain: layout style paint;
}

/* 고해상도 디스플레이 최적화 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    .item-image,
    .achievement-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: optimizeQuality;
    }
}

/* 다크모드 지원 */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2c3e50 0%, #3f4c6b 100%);
    }
    
    .container {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .modal-content {
        background: #2c2c2c;
        color: #ffffff;
    }
    
    .bucket-item,
    .gallery-item,
    .profile-card:not(.new-user):not(.guest) {
        background: #2c2c2c;
        color: #ffffff;
    }
    
    .stat-card {
        background: linear-gradient(135deg, #4a4a4a 0%, #5a5a5a 100%);
    }
}

/* 프로필 선택 화면 */
.profile-selector {
    padding: 50px 40px;
    text-align: center;
    min-height: 500px;
    background: linear-gradient(135deg, #f8f9ff 0%, #e3f2fd 100%);
}

.profile-selector h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: -1px;
}

.profile-selector p {
    color: #546e7a;
    margin-bottom: 50px;
    font-size: 1.2rem;
    font-weight: 400;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.profile-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
}

.profile-card {
    background: white;
    color: #2c3e50;
    padding: 35px 25px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    font-family: inherit;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    
    /* 터치 최적화 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.profile-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(79, 172, 254, 0.2);
    border-color: rgba(79, 172, 254, 0.3);
}

.profile-card:hover::before {
    transform: scaleX(1);
}

.profile-card.new-user {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
}

.profile-card.new-user::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.profile-card.new-user::before {
    background: linear-gradient(90deg, #ffffff 0%, #f0f9ff 100%);
}

.profile-card.new-user h3 {
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.7);
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.profile-card.new-user p {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.9);
    font-weight: 700;
    font-size: 1.05rem;
    opacity: 1;
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    padding: 12px 18px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.profile-card.guest {
    background: linear-gradient(135deg, #96ceb4 0%, #4ecdc4 100%);
    color: white;
    position: relative;
}

.profile-card.guest::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.08);
    pointer-events: none;
}

.profile-card.guest::before {
    background: linear-gradient(90deg, #ffffff 0%, #f0fff4 100%);
}

.profile-card.guest h3 {
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.profile-card.guest p {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.9);
    font-weight: 700;
    font-size: 1.05rem;
    opacity: 1;
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    padding: 12px 18px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.profile-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.profile-card p {
    font-size: 1rem;
    opacity: 0.85;
    line-height: 1.5;
}

.profile-card .profile-meta {
    color: #2c3e50;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    text-shadow: none;
}

.profile-card.new-user .profile-meta,
.profile-card.guest .profile-meta {
    margin-top: 20px;
    font-size: 0.9rem;
    opacity: 1;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
    color: #ffffff;
}

.header {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.95) 0%, rgba(0, 242, 254, 0.95) 100%),
                linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 2;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 12px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), 
                 0 4px 20px rgba(0, 0, 0, 0.15);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 400;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.header-controls {
    position: absolute;
    top: 25px;
    right: 25px;
    display: flex;
    gap: 12px;
    z-index: 3;
}

.header-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    
    /* 터치 최적화 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.header-btn:active {
    transform: translateY(0);
}

.auto-logout-notice {
    position: fixed;
    top: 25px;
    right: 25px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    backdrop-filter: blur(10px);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 32px rgba(255, 107, 107, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.auto-logout-notice button {
    margin-left: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    
    /* 터치 최적화 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.auto-logout-notice button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.nav-tabs {
    display: flex;
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.nav-tab {
    flex: 1;
    padding: 18px 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    letter-spacing: 0.3px;
    
    /* 터치 최적화 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.nav-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-tab.active {
    background: #ffffff;
    color: #4facfe;
    border-bottom: none;
}

.nav-tab.active::after {
    width: 80%;
}

.nav-tab:hover {
    background: #f8f9fa;
    color: #4facfe;
}

.nav-tab:hover::after {
    width: 60%;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.controls {
    padding: 25px;
    border-bottom: 1px solid #eee;
}

.add-form {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 15px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 0.9rem;
}

.form-group input, .form-group select {
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
    
    /* 터치 최적화 */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    align-self: end;
    letter-spacing: 0.3px;
    text-transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    
    /* 터치 최적화 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.35);
    background: linear-gradient(135deg, #3d8bfe 0%, #00d9fe 100%);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
}

.btn-success {
    background: #28a745;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.btn-info {
    background: #17a2b8;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.3);
}

.btn-warning {
    background: #ffc107;
    color: #212529;
    font-weight: 700;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.3);
}

.btn-danger {
    background: #dc3545;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

.btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.4);
}

/* 매우 위험한 버튼 스타일 */
.btn-danger-extreme {
    background: linear-gradient(135deg, #dc3545 0%, #a71e2a 100%);
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    border: 1px solid #c82333;
    position: relative;
    overflow: hidden;
}

.btn-danger-extreme::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.btn-danger-extreme:hover::before {
    left: 100%;
}

.btn-danger-extreme:hover {
    background: linear-gradient(135deg, #c82333 0%, #8b1a1a 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

.data-management {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 15px;
    border: 2px solid #e1e8ed;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
    font-weight: 500;
    
    /* 터치 최적화 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.filter-btn.active {
    background: #4facfe;
    color: white;
    border-color: #4facfe;
}

.filter-btn:hover {
    background: #f8f9fa;
    border-color: #4facfe;
}

.filter-btn.active:hover {
    background: #3d8bfe;
}

.content {
    padding: 25px;
}

.bucket-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    
    /* 성능 최적화 */
    contain: layout style paint;
}

.bucket-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s;
    border-left: 4px solid;
    position: relative;
    
    /* 성능 최적화 */
    contain: layout style;
    will-change: transform;
}

.bucket-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.bucket-item.completed {
    opacity: 0.8;
}

.bucket-item.completed::after {
    content: '🎉';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    z-index: 2;
}

.bucket-item.travel { border-left-color: #ff6b6b; }
.bucket-item.hobby { border-left-color: #4ecdc4; }
.bucket-item.career { border-left-color: #45b7d1; }
.bucket-item.relationship { border-left-color: #96ceb4; }
.bucket-item.health { border-left-color: #feca57; }
.bucket-item.other { border-left-color: #a55eea; }

.item-image-container {
    position: relative;
    width: 100%;
    height: 180px;
    background: #f8f9fa;
    overflow: hidden;
}

.item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    
    /* 이미지 최적화 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimizeQuality;
}

.bucket-item:hover .item-image {
    transform: scale(1.05);
}

.image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    font-size: 3rem;
}

/* 사진이 있을 때 이미지 컨테이너에 삭제 버튼 표시 */
.item-image-container.has-image {
    position: relative;
}

.item-image-container.has-image .image-delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
    z-index: 3;
    
    /* 터치 최적화 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.item-image-container.has-image:hover .image-delete-btn {
    opacity: 1;
}

.item-image-container.has-image .image-delete-btn:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

.item-content {
    padding: 20px;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.item-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    flex: 1;
    line-height: 1.4;
}

.item-controls {
    display: flex;
    gap: 5px;
    margin-left: 10px;
}

.btn-small {
    padding: 6px 10px;
    font-size: 0.75rem;
    border-radius: 6px;
    min-width: auto;
    
    /* 터치 최적화 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.category-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: white;
}

.category-tag.travel { background: #ff6b6b; }
.category-tag.hobby { background: #4ecdc4; }
.category-tag.career { background: #45b7d1; }
.category-tag.relationship { background: #96ceb4; }
.category-tag.health { background: #feca57; }
.category-tag.other { background: #a55eea; }

.completion-note {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
    border-left: 3px solid #2ed573;
}

.completion-note-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2ed573;
    margin-bottom: 5px;
}

.completion-note-text {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

.completion-date {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 5px;
}

.download-card-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
    
    /* 터치 최적화 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.download-card-btn:hover {
    background: #ff5252;
}

.image-upload-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.upload-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.upload-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* 터치 최적화 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.upload-btn:hover {
    background: #f8f9fa;
}

.upload-btn.camera {
    background: #4facfe;
    color: white;
    border-color: #4facfe;
}

.upload-btn.camera:hover {
    background: #3d8bfe;
}

.file-input {
    display: none;
}

/* 사진이 있을 때 업로드 버튼 스타일 개선 */
.image-upload-section.has-image .upload-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
}

.image-upload-section.has-image .upload-btn {
    font-size: 0.75rem;
    padding: 6px 8px;
}

.btn-delete-image {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.btn-delete-image:hover {
    background: #c82333;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 20px;
    border-radius: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* 성능 최적화 */
    contain: layout style;
    will-change: transform;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: rotate(45deg);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.3);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.95;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #6c757d;
}

.empty-state h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.download-section {
    text-align: center;
    padding: 25px;
    border-top: 1px solid #eee;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    
    /* 성능 최적화 */
    contain: layout style paint;
}

.gallery-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s;
    
    /* 성능 최적화 */
    contain: layout style;
    will-change: transform;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.sort-controls {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.sort-label {
    font-weight: 600;
    color: #333;
}

.sort-select {
    padding: 8px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 0.9rem;
    
    /* 터치 최적화 */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* 프로필 관리 섹션 */
.profile-management {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.profile-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.profile-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.profile-item.current {
    border: 2px solid #4facfe;
    background: #f0f9ff;
}

.profile-item h4 {
    margin-bottom: 5px;
    color: #333;
}

.profile-item p {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 10px;
}

.profile-item-controls {
    display: flex;
    gap: 5px;
}

.profile-item-btn {
    padding: 4px 8px;
    font-size: 0.7rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    
    /* 터치 최적화 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
    
    /* 성능 최적화 */
    will-change: opacity;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 25px;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    
    /* 성능 최적화 */
    will-change: transform;
}

.modal-header {
    margin-bottom: 20px;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.modal-subtitle {
    color: #6c757d;
    font-size: 0.9rem;
}

.modal-form {
    margin-bottom: 20px;
}

.modal-form textarea, .modal-form input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    margin-bottom: 10px;
    
    /* 터치 최적화 */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.modal-form textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-form textarea:focus, .modal-form input:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.modal-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 0.9rem;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-modal {
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    
    /* 터치 최적화 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-cancel {
    background: #6c757d;
    color: white;
}

.btn-confirm {
    background: #2ed573;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

/* 이미지 설정 모달 전용 스타일 */
.image-settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.settings-group input[type="number"],
.settings-group select {
    padding: 10px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    background: white;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.settings-group input[type="number"]:focus,
.settings-group select:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

/* 슬라이더 스타일 */
.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider-container input[type="range"] {
    flex: 1;
    height: 6px;
    background: #e1e8ed;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #4facfe;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(79, 172, 254, 0.3);
    transition: all 0.2s ease;
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
    background: #2196f3;
    transform: scale(1.1);
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #4facfe;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(79, 172, 254, 0.3);
    transition: all 0.2s ease;
}

.slider-container input[type="range"]::-moz-range-thumb:hover {
    background: #2196f3;
    transform: scale(1.1);
}

.slider-value {
    font-weight: 600;
    color: #4facfe;
    font-size: 0.9rem;
    min-width: 32px;
    text-align: center;
}

/* 체크박스 스타일 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid #e1e8ed;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked {
    background: #4facfe;
    border-color: #4facfe;
}

.checkbox-label input[type="checkbox"]:checked::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.checkbox-text {
    user-select: none;
}

/* 설정 도움말 텍스트 */
.setting-help {
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.4;
}

/* 설정 미리보기 */
.settings-preview {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

.settings-preview h4 {
    margin-bottom: 10px;
    color: #333;
    font-size: 0.9rem;
}

.preview-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.preview-item {
    font-size: 0.8rem;
    color: #6c757d;
}

.preview-item strong {
    color: #4facfe;
    font-weight: 600;
}

/* 파일 크기 예상 스타일 */
.file-size-estimate {
    margin-top: 15px;
    padding: 12px;
    background: #f0f8ff;
    border: 1px solid #e1f0ff;
    border-radius: 6px;
}

.file-size-estimate h5 {
    margin-bottom: 8px;
    color: #333;
    font-size: 0.85rem;
    font-weight: 600;
}

.size-comparison {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.size-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.size-label {
    color: #666;
    font-weight: 500;
}

.size-value {
    font-weight: 600;
    color: #4facfe;
}

.compression-ratio {
    border-top: 1px solid #e1f0ff;
    padding-top: 6px;
    margin-top: 3px;
}

.compression-ratio .size-value {
    color: #2ed573;
}

.estimate-note {
    margin-top: 8px;
    padding: 6px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    text-align: center;
}

.estimate-note small {
    color: #856404;
    font-size: 0.75rem;
    line-height: 1.3;
}

/* 실시간 피드백 스타일 */
.settings-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2ed573;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    z-index: 9999;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.settings-feedback.show {
    opacity: 1;
    transform: translateX(0);
}

.settings-feedback.error {
    background: #ff4757;
}

.settings-feedback.warning {
    background: #ffa502;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .image-settings-form {
        gap: 15px;
    }
    
    .settings-group {
        gap: 6px;
    }
    
    .slider-container {
        gap: 8px;
    }
    
    .preview-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-modal {
        width: 100%;
        padding: 12px;
    }
    
    .file-size-estimate {
        margin-top: 10px;
        padding: 10px;
    }
    
    .size-comparison {
        gap: 4px;
    }
    
    .size-item {
        font-size: 0.75rem;
    }
    
    .settings-feedback {
        position: fixed;
        top: 10px;
        right: 10px;
        left: 10px;
        text-align: center;
    }
}

/* 세련된 인스타그램 스타일 달성 카드 */
.achievement-card {
    width: 400px;
    height: 600px;
    border-radius: 20px;
    padding: 0;
    position: relative;
    overflow: hidden;
    margin: 20px auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    background: #ffffff;
    
    /* 성능 최적화 */
    contain: layout style paint;
}

/* 카테고리별 미니멀 배경 테마 */
.achievement-card.travel {
    background: linear-gradient(135deg, #E3F2FD 0%, #F3E5F5 100%);
}

.achievement-card.hobby {
    background: linear-gradient(135deg, #E8F5E9 0%, #F1F8E9 100%);
}

.achievement-card.career {
    background: linear-gradient(135deg, #EDE7F6 0%, #F3E5F5 100%);
}

.achievement-card.relationship {
    background: linear-gradient(135deg, #FFF8E1 0%, #FFEBEE 100%);
}

.achievement-card.health {
    background: linear-gradient(135deg, #E0F7FA 0%, #FFF9C4 100%);
}

.achievement-card.other {
    background: linear-gradient(135deg, #FAFAFA 0%, #F5F5F5 100%);
}

/* 미니멀 상단 액센트 */
.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    z-index: 10;
}

.achievement-card.travel::before {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.achievement-card.hobby::before {
    background: linear-gradient(90deg, #4ecdc4 0%, #44a08d 100%);
}

.achievement-card.career::before {
    background: linear-gradient(90deg, #667eea 0%, #f093fb 100%);
}

.achievement-card.relationship::before {
    background: linear-gradient(90deg, #fcb69f 0%, #ff9a9e 100%);
}

.achievement-card.health::before {
    background: linear-gradient(90deg, #a8edea 0%, #fed6e3 100%);
}

.achievement-card.other::before {
    background: linear-gradient(90deg, #d299c2 0%, #667eea 100%);
}

.achievement-card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* 깔끔한 헤더 */
.achievement-header {
    padding: 25px 30px 20px;
    text-align: left;
    background: white;
}

.achievement-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.achievement-category {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 이미지 영역 */
.achievement-image-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: #f5f5f5;
}

.achievement-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    
    /* 이미지 최적화 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimizeQuality;
}

/* 이미지 없을 때 미니멀 아이콘 */
.achievement-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
}

.achievement-icon {
    font-size: 3rem;
    opacity: 0.3;
    color: #666;
}

/* 콘텐츠 영역 */
.achievement-body {
    flex: 1;
    padding: 25px 30px;
    background: white;
    display: flex;
    flex-direction: column;
}

/* 달성 후기 */
.achievement-note {
    flex: 1;
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    font-weight: 400;
    font-style: italic;
}

.achievement-note-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    font-weight: 400;
    margin-bottom: 15px;
}

/* 달성 날짜 */
.achievement-date {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* 푸터 영역 */
.achievement-footer {
    padding: 20px 30px;
    background: white;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.achievement-user .user-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.achievement-user .user-subtitle {
    font-size: 0.85rem;
    color: #666;
}

.achievement-branding {
    text-align: right;
}

.achievement-branding .brand-name {
    font-size: 1rem;
    font-weight: 600;
    color: #4facfe;
    margin-bottom: 2px;
}

.achievement-branding .brand-subtitle {
    font-size: 0.8rem;
    color: #888;
}

/* 카드 알림 애니메이션 */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes fadeOutScale {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* 카드 생성 관련 추가 애니메이션 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes progress {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* 축하 메시지 */
.achievement-message {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    padding: 15px;
    background: #fafafa;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
}

/* 푸터 정보 */
.achievement-footer {
    padding: 20px 30px 25px;
    background: white;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.achievement-user-info {
    text-align: left;
}

.achievement-user-name {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.achievement-date {
    font-size: 0.85rem;
    color: #999;
}

/* 브랜딩 */
.achievement-branding {
    font-size: 0.75rem;
    color: #999;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 5px;
}

.achievement-branding::before {
    content: '🎯';
    font-size: 1rem;
}

/* 완료된 항목 스타일 개선 */
.completed-controls {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.btn-edit {
    background: #17a2b8;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    flex: 1;
    transition: all 0.3s;
    
    /* 터치 최적화 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-edit:hover {
    background: #138496;
    transform: translateY(-1px);
}

/* PWA 설치 버튼 */
.install-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #4facfe;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
    display: none;
    z-index: 100;
    
    /* 터치 최적화 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.install-btn:hover {
    background: #3d8bfe;
}

/* 키보드 네비게이션 스타일 */
.filter-btn:focus,
.nav-tab:focus,
.btn:focus,
.profile-card:focus {
    outline: 2px solid #4facfe;
    outline-offset: 2px;
}

/* 접근성을 위한 고대비 모드 지원 */
@media (prefers-contrast: high) {
    .bucket-item {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .filter-btn.active {
        border: 2px solid #000;
    }
}

/* 애니메이션 감소 설정 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 포커스 표시 개선 */
.bucket-item:focus-within {
    outline: 2px solid #4facfe;
    outline-offset: 2px;
}

/* 숨겨진 요소들 */
.main-app {
    display: none;
}

.main-app.active {
    display: block;
}

/* 반응형 디자인 개선 */
@media (max-width: 768px) {
    body {
        padding: 8px;
        padding-bottom: 40px; /* 제작자 정보 공간 확보 */
    }

    .container {
        border-radius: 20px;
    }

    .header {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .header p {
        font-size: 1rem;
    }

    .header-controls {
        position: static;
        margin-top: 20px;
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    .header-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
        flex: 1;
        min-width: 0;
    }

    .profile-selector {
        padding: 30px 20px;
    }

    .profile-selector h1 {
        font-size: 2.2rem;
        margin-bottom: 12px;
    }

    .profile-selector p {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .controls, .content {
        padding: 15px;
    }

    .add-form {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .bucket-list, .gallery-grid, .profile-options {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 18px 15px;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .item-content {
        padding: 15px;
    }

    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }

    .upload-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .image-upload-section.has-image .upload-buttons {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .data-management {
        flex-direction: column;
        gap: 8px;
    }

    .nav-tab {
        font-size: 0.9rem;
        padding: 15px 12px;
    }

    .achievement-card {
        width: 350px;
        height: 500px;
        padding: 0;
    }

    .achievement-card-content {
        padding: 30px 25px 25px;
    }

    .achievement-title {
        font-size: 1.8rem;
    }

    .achievement-image {
        height: 160px;
    }

    .profile-list {
        grid-template-columns: 1fr;
    }

    .profile-card {
        padding: 25px 20px;
    }

    .profile-card h3 {
        font-size: 1.2rem;
    }

    .profile-card p {
        font-size: 0.95rem;
    }

    .profile-card.new-user p,
    .profile-card.guest p {
        font-size: 1rem;
        padding: 8px 12px;
        font-weight: 600;
    }

    .profile-card .profile-meta {
        font-size: 0.85rem;
        padding: 6px 10px;
        font-weight: 600;
    }

    .profile-card.new-user .profile-meta,
    .profile-card.guest .profile-meta {
        font-size: 0.85rem;
        padding: 6px 10px;
        font-weight: 600;
    }

    .completed-controls {
        flex-direction: column;
        gap: 8px;
    }

    .auto-logout-notice {
        top: 15px;
        right: 15px;
        left: 15px;
        font-size: 0.85rem;
        padding: 12px 15px;
    }

    .auto-logout-notice button {
        margin-left: 10px;
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    
    /* 모바일에서 필터 버튼 터치 영역 확대 */
    .filter-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
        min-height: 44px;
    }
    
    /* 모바일에서 업로드 버튼 개선 */
    .upload-btn {
        padding: 12px 16px;
        font-size: 0.9rem;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
    }

    .container {
        border-radius: 16px;
    }

    .header {
        padding: 25px 15px;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .header p {
        font-size: 0.95rem;
    }

    .header-controls {
        gap: 8px;
    }

    .header-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
        min-height: 40px;
    }

    .profile-selector {
        padding: 25px 15px;
    }

    .profile-selector h1 {
        font-size: 2rem;
    }

    .profile-card.new-user p,
    .profile-card.guest p {
        font-size: 0.9rem;
        padding: 6px 10px;
        font-weight: 600;
    }

    .profile-card .profile-meta {
        font-size: 0.8rem;
        padding: 5px 8px;
        font-weight: 600;
    }

    .profile-card.new-user .profile-meta,
    .profile-card.guest .profile-meta {
        font-size: 0.8rem;
        padding: 5px 8px;
        font-weight: 600;
    }

    .item-image-container {
        height: 150px;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .filters {
        justify-content: center;
    }

    .filter-btn {
        font-size: 0.8rem;
        padding: 8px 14px;
        min-height: 40px;
    }

    .achievement-card {
        width: 300px;
        height: 450px;
    }

    .achievement-card-content {
        padding: 25px 20px 20px;
    }

    .achievement-title {
        font-size: 1.5rem;
    }
    
    /* 작은 화면에서 터치 영역 추가 최적화 */
    .btn-small {
        min-height: 32px;
        min-width: 32px;
        padding: 4px 8px;
    }
    
    .modal-buttons .btn-modal {
        min-height: 44px;
        padding: 12px 20px;
    }
}

/* 매우 큰 화면 최적화 (데스크톱) */
@media (min-width: 1400px) {
    .bucket-list {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .profile-options {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

/* 프린트 스타일 */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        border-radius: 0;
    }
    
    .header-controls,
    .nav-tabs,
    .upload-buttons,
    .completed-controls,
    .install-btn,
    .auto-logout-notice {
        display: none !important;
    }
    
    .bucket-item {
        break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* ========== 꿈의 여정 탭 스타일 ========== */
.journey-stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
}

.timeline-dot.travel { background: #4facfe; }
.timeline-dot.hobby { background: #43e97b; }
.timeline-dot.career { background: #fa709a; }
.timeline-dot.relationship { background: #f093fb; }
.timeline-dot.health { background: #4fffe7; }
.timeline-dot.other { background: #ffd200; }

.category-progress-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.progress-fill.travel { background: linear-gradient(90deg, #4facfe, #00f2fe); }
.progress-fill.hobby { background: linear-gradient(90deg, #43e97b, #38f9d7); }
.progress-fill.career { background: linear-gradient(90deg, #fa709a, #fee140); }
.progress-fill.relationship { background: linear-gradient(90deg, #f093fb, #f5576c); }
.progress-fill.health { background: linear-gradient(90deg, #4fffe7, #4facfe); }
.progress-fill.other { background: linear-gradient(90deg, #ffd200, #f7971e); }

.daily-inspiration {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-top: 20px;
}

.daily-inspiration blockquote {
    font-size: 1.2rem;
    font-style: italic;
    margin: 20px 0;
    line-height: 1.6;
}

.daily-inspiration cite {
    opacity: 0.9;
    font-size: 0.9rem;
}

.journey-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.category-progress-section {
    margin: 30px 0;
}

.category-progress-grid {
    display: grid;
    gap: 15px;
}

.timeline-container {
    margin: 30px 0;
}

.timeline {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.empty-timeline,
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* 반응형 디자인 - 꿈의 여정 탭 */
@media (max-width: 768px) {
    .journey-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .timeline-item {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .category-progress-card {
        padding: 15px;
    }
    
    .daily-inspiration {
        padding: 20px;
        margin-top: 15px;
    }
    
    .daily-inspiration blockquote {
        font-size: 1rem;
    }
}

/* 개선된 타임라인 스타일 */
.timeline-dot {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
}

.timeline-number {
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
}

.timeline-content {
    flex: 1;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
}

.timeline-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
    margin: 0;
}

.timeline-emotion {
    font-size: 1.5rem;
    margin-left: 10px;
}

.timeline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
}

.timeline-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.timeline-note {
    font-size: 0.9rem;
    color: #546e7a;
    margin: 10px 0;
    padding: 10px;
    background: #f5f7fa;
    border-radius: 8px;
    border-left: 3px solid #4facfe;
}

.timeline-meaning {
    font-style: italic;
    color: #666;
    margin: 10px 0;
    padding: 8px 12px;
    background: #fffbf0;
    border-radius: 6px;
    border-left: 3px solid #ffa502;
}

.emotional-summary {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
}

.emotion-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #e3f2fd;
    border-radius: 20px;
    color: #1976d2;
    font-weight: 500;
}

.emotion-journey {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: #f3e5f5;
    border-radius: 20px;
    color: #7b1fa2;
    font-weight: 500;
}

.emotion-count {
    color: #666;
    font-size: 0.8rem;
}

.timeline-stats {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.timeline-stat h5 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.timeline-stat p {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

.category-distribution {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.empty-timeline .subtitle {
    font-size: 0.9rem;
    color: #999;
}

/* Timeline icons */
.icon-calendar::before {
    content: '📅';
    margin-right: 3px;
}

.icon-clock::before {
    content: '⏰';
    margin-right: 3px;
}

/* Timeline responsive */
@media (max-width: 768px) {
    .timeline-dot {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.8rem;
    }
    
    .timeline-header h4 {
        font-size: 1rem;
    }
    
    .timeline-emotion {
        font-size: 1.2rem;
    }
    
    .timeline-meta {
        font-size: 0.8rem;
        gap: 10px;
    }
    
    .timeline-stats {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
}

/* 달성 예측 카드 스타일 */
.prediction-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.prediction-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.prediction-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.prediction-card.high {
    border-top: 4px solid #4caf50;
}

.prediction-card.medium {
    border-top: 4px solid #ff9800;
}

.prediction-card.low {
    border-top: 4px solid #f44336;
}

.prediction-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.prediction-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    flex: 1;
}

.category-badge {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-left: 10px;
}

.category-badge.travel { background: #e3f2fd; }
.category-badge.hobby { background: #e8f5e9; }
.category-badge.career { background: #fce4ec; }
.category-badge.relationship { background: #fff3e0; }
.category-badge.health { background: #e0f7fa; }
.category-badge.other { background: #fff9c4; }

.prediction-probability {
    margin: 15px 0;
}

.probability-gauge {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.probability-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    transition: width 0.3s ease;
}

.prediction-card.medium .probability-fill {
    background: linear-gradient(90deg, #ff9800, #ffb74d);
}

.prediction-card.low .probability-fill {
    background: linear-gradient(90deg, #f44336, #e57373);
}

.probability-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.probability-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
}

.probability-label {
    font-size: 0.9rem;
    color: #666;
}

.prediction-timeline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #f5f7fa;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 0.9rem;
    color: #546e7a;
}

.prediction-next-step {
    margin: 15px 0;
    padding: 15px;
    background: #e8f5e9;
    border-radius: 8px;
    border-left: 3px solid #4caf50;
}

.prediction-next-step h5 {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    color: #2e7d32;
}

.prediction-next-step p {
    margin: 0 0 5px 0;
    color: #333;
}

.step-duration {
    font-size: 0.85rem;
    color: #666;
}

.prediction-tips {
    margin: 15px 0;
}

.prediction-tips h5 {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    color: #1976d2;
}

.prediction-tips ul {
    margin: 0;
    padding-left: 20px;
}

.prediction-tips li {
    font-size: 0.9rem;
    color: #546e7a;
    margin-bottom: 5px;
}

.prediction-risks {
    margin: 15px 0;
    padding: 12px;
    background: #fff3e0;
    border-radius: 8px;
    border-left: 3px solid #ff9800;
}

.prediction-risks h5 {
    margin: 0 0 5px 0;
    font-size: 0.95rem;
    color: #e65100;
}

.prediction-risks p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.prediction-emotion {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.emotion-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #666;
}

.overall-motivation {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    text-align: center;
}

.overall-motivation h4 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.overall-motivation p {
    margin: 0;
    font-size: 0.95rem;
}

.empty-predictions {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-predictions .subtitle {
    font-size: 0.9rem;
    color: #999;
    margin-top: 10px;
}

/* 반응형 디자인 - 예측 카드 */
@media (max-width: 768px) {
    .prediction-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .prediction-card {
        padding: 15px;
    }
    
    .probability-value {
        font-size: 1.5rem;
    }
    
    .prediction-header h4 {
        font-size: 1rem;
    }
}

/* 감정 체크인 버튼 */
.btn-emotion {
    background: #FFE0B2;
    border: none;
    font-size: 1.2rem;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-emotion:hover {
    background: #FFCC80;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

/* 확률 원형 표시 (대체 스타일) */
.probability-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin: 10px auto;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.prediction-card.high .probability-circle {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
}

.prediction-card.medium .probability-circle {
    background: linear-gradient(135deg, #FFC107, #FFD54F);
}

.prediction-card.low .probability-circle {
    background: linear-gradient(135deg, #FF5722, #FF7043);
}

/* 공유 목표 카드 */
.shared-goal-card {
    background: #F3F4F6;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #E5E7EB;
    transition: all 0.3s ease;
}

.shared-goal-card:hover {
    background: #EFEFEF;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.shared-goal-card h4 {
    margin: 0 0 10px 0;
    color: #374151;
    font-size: 1rem;
}

.shared-goal-card .goal-owner {
    font-size: 0.85rem;
    color: #6B7280;
    margin-bottom: 8px;
}

.shared-goal-card .goal-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.shared-goal-card .btn-encourage,
.shared-goal-card .btn-adopt {
    padding: 5px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shared-goal-card .btn-encourage {
    background: #FEE2E2;
    color: #DC2626;
}

.shared-goal-card .btn-encourage:hover {
    background: #FCA5A5;
}

.shared-goal-card .btn-adopt {
    background: #DBEAFE;
    color: #2563EB;
}

.shared-goal-card .btn-adopt:hover {
    background: #93C5FD;
}

/* 챌린지 카드 */
.challenge-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.challenge-card:hover {
    border-color: #4facfe;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.2);
}

.challenge-card h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.challenge-card .challenge-description {
    color: #546e7a;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.challenge-card .challenge-participants {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.challenge-card .participant {
    padding: 4px 10px;
    background: #E3F2FD;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #1976D2;
}

.challenge-card .challenge-progress {
    background: #f0f0f0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.challenge-card .challenge-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    transition: width 0.3s ease;
}

/* 차트 컨테이너 최적화 */
.insight-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.insight-card h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.insight-card canvas {
    max-height: 300px !important;
    width: 100% !important;
    height: auto !important;
}

/* 인사이트 그리드 */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* 가족 구성원 카드 */
.family-member-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

.family-member-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.family-member-info {
    flex: 1;
}

.family-member-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.family-member-status {
    font-size: 0.85rem;
    color: #666;
}

.family-member-actions {
    display: flex;
    gap: 8px;
}

/* 응원 메시지 벽 */
.encouragement-wall {
    background: #F9FAFB;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.encouragement-message {
    background: white;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid #4facfe;
}

.encouragement-author {
    font-weight: 600;
    color: #4facfe;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.encouragement-text {
    color: #546e7a;
    font-size: 0.95rem;
}

.encouragement-time {
    font-size: 0.8rem;
    color: #999;
    margin-top: 5px;
}
