/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #87CEEB 0%, #B0E0E6 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: none;
    margin: 0 auto;
    padding: 10px;
    width: 100%;
}

/* 헤더 */
header {
    text-align: center;
    margin-bottom: 15px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 탭 네비게이션 */
.tabs {
    display: flex;
    background: white;
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: #E6F3FF;
    color: #4A90E2;
}

.tab-btn.active {
    background: #4A90E2;
    color: white;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

/* 탭 콘텐츠 */
.tab-content {
    display: none;
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    min-height: calc(100vh - 160px);
    height: calc(100vh - 160px);
}

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

/* 홈 탭 */
/* 랜딩: 히어로 */
.landing-hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 28px;
    align-items: center;
    padding: 24px;
}

.hero-title {
    font-size: 2.2rem;
    line-height: 1.25;
    color: #1f2d3d;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 18px;
}

.hero-actions { display: flex; gap: 10px; }

.primary-btn, .secondary-btn {
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.primary-btn { color: #fff; background: #1a73e8; }
.primary-btn:hover { background: #155ec0; transform: translateY(-1px); }

.secondary-btn { color: #1a73e8; background: #e8f0fe; }
.secondary-btn:hover { background: #d2e3fc; transform: translateY(-1px); }

.login-hint { margin-top: 8px; color: #6b7280; font-size: 0.95rem; }

.hero-visual { display: flex; justify-content: center; }
.device-mockup {
    width: 100%; max-width: 420px; height: 280px;
    border-radius: 18px; border: 1px solid #e5e7eb; overflow: hidden;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    box-shadow: 0 24px 60px rgba(31, 45, 61, 0.15);
}
.mockup-screen { width: 100%; height: 100%; background: linear-gradient(135deg, #e0ecff 0%, #ffffff 60%); }

/* 랜딩: 기능 섹션 */
.landing-features { padding: 8px 24px 0 24px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-item { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px; }
.feature-title { font-size: 1.05rem; color: #1f2d3d; margin-bottom: 6px; }
.feature-desc { color: #4a5568; line-height: 1.55; }

/* 랜딩: CTA 섹션 */
.landing-cta { padding: 8px 24px 0 24px; }
.cta-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%); border: 1px solid #e5e7eb; border-radius: 14px; padding: 18px; }
.cta-text h3 { color: #1f2d3d; margin-bottom: 6px; }
.cta-text p { color: #4a5568; }

/* 랜딩: 로그인 상태 섹션 */
.landing-auth { padding: 16px 24px 8px 24px; }

@media (max-width: 992px) {
    .landing-hero { grid-template-columns: 1fr; }
    .device-mockup { height: 200px; }
    .features-grid { grid-template-columns: 1fr; }
    .cta-card { flex-direction: column; align-items: flex-start; }
}

.status-card {
    background: #F0F8FF;
    border: 2px solid #B0E0E6;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator .loading {
    color: #ffa500;
    font-weight: 500;
}

.status-indicator .online {
    color: #28a745;
    font-weight: 500;
}

.status-indicator .offline {
    color: #dc3545;
    font-weight: 500;
}

/* 채팅 탭 */
.chat-container {
    height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #B0E0E6;
    margin-bottom: 20px;
}

.chat-header h3 {
    color: #4A90E2;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background: #28a745;
}

.status-dot.offline {
    background: #dc3545;
}

.chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
    background: #F0F8FF;
    border-radius: 12px;
    margin-bottom: 20px;
    width: 100%;
}

/* 채팅 본문 레이아웃 (메시지 + 우측 패널) */
.chat-body {
    display: flex;
    gap: 20px;
    height: calc(100vh - 280px);
    min-height: 500px;
    width: 100%;
}

.chat-main {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
}

.wardrobe-panel {
    width: 320px;
    background: #FFFFFF;
    border: 2px solid #B0E0E6;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: calc(100vh - 280px);
    min-height: 500px;
    flex: 0 0 320px;
}

/* 마이페이지 레이아웃: 두 패널을 가로 50%씩 배치 */
.mypage-container { width: 100%; }
.mypage-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}
.mypage-grid .wardrobe-panel,
.mypage-grid .style-collection-panel {
    width: 100%;
    flex: 1 1 auto;
    height: calc(100vh - 280px);
    min-height: 500px;
}

/* 스타일 보관함 패널 */
.style-collection-panel {
    width: 320px;
    background: #FFFFFF;
    border: 2px solid #B0E0E6;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: calc(100vh - 280px);
    min-height: 500px;
    flex: 0 0 320px;
}

.style-panel-header {
    font-weight: 700;
    color: #357ABD;
    border-bottom: 2px solid #E6F3FF;
    padding-bottom: 8px;
}

.style-panel-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex: 1;
}

.style-cards { display: flex; flex-direction: column; gap: 12px; }

.style-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.style-card img {
    width: 300px;
    height: 600px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.style-card-actions { display: flex; gap: 8px; }
.style-save-btn { background: #4A90E2; color: #fff; border: none; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.style-delete-btn { background: #FF6B6B; color: #fff; border: none; padding: 8px 12px; border-radius: 8px; cursor: pointer; }

.wardrobe-panel-header {
    font-weight: 700;
    color: #357ABD;
    border-bottom: 2px solid #E6F3FF;
    padding-bottom: 8px;
}

.wardrobe-panel-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex: 1;
}

.wardrobe-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wardrobe-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

/* 인기 상품 탭 스타일 */
.popular-container { display: flex; flex-direction: column; gap: 16px; }
.popular-section { background: #FFFFFF; border: 2px solid #B0E0E6; border-radius: 12px; padding: 14px; }
.popular-section-header { font-weight: 700; color: #1f2d3d; border-bottom: 2px solid #E6F3FF; padding-bottom: 8px; margin-bottom: 12px; }
.popular-list { display: flex; flex-direction: column; gap: 12px; }
.popular-item { display: flex; gap: 12px; background: #f8fbff; border: 1px solid #e5effa; border-radius: 12px; padding: 12px; box-shadow: 0 2px 8px rgba(31,45,61,0.06); }
.popular-item-thumb { width: 180px; height: 260px; background: linear-gradient(135deg, #e0ecff 0%, #ffffff 60%); border: 1px solid #e5e7eb; border-radius: 10px; }
.popular-item-info { display: flex; flex-direction: column; justify-content: space-between; padding: 4px 2px; flex: 1; }
.popular-item-title { font-weight: 700; color: #1f2d3d; margin-bottom: 6px; }
.popular-item-meta { color: #4a5568; font-size: 0.95rem; }
.popular-item-actions { display: flex; gap: 8px; margin-top: 10px; }
.btn-primary { color: #fff; background: #1a73e8; border: none; padding: 10px 14px; border-radius: 10px; font-weight: 600; cursor: pointer; }
.btn-primary:hover { background: #155ec0; transform: translateY(-1px); }
.btn-secondary { color: #1a73e8; background: #e8f0fe; border: none; padding: 10px 14px; border-radius: 10px; font-weight: 600; cursor: pointer; }
.btn-secondary:hover { background: #d2e3fc; transform: translateY(-1px); }

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-hint {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.4;
}

.product-panel-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

.product-preview-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid #B0E0E6;
}

.product-info .info-row {
    display: flex;
    gap: 8px;
    margin: 6px 0;
    align-items: flex-start;
}

.product-info .info-label {
    min-width: 58px;
    color: #495057;
    font-weight: 600;
}

.product-info .info-value {
    color: #2C5F8B;
}

.product-info .info-value.multi {
    white-space: pre-wrap;
    line-height: 1.5;
}

.product-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    text-align: center;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #4A90E2 0%, #6BB4FF 100%);
    box-shadow: 0 6px 14px rgba(74, 144, 226, 0.25);
    border: 1px solid rgba(74, 144, 226, 0.35);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    width: 100%;
}

.product-link-btn::before {
    content: '🛒';
    font-size: 18px;
}

.product-link-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(74, 144, 226, 0.3);
}

.product-link-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 12px rgba(74, 144, 226, 0.25);
}

.message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-items: flex-end;
}

.message.bot {
    align-items: flex-start;
}

.message-content {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: 18px;
    word-wrap: break-word;
    font-size: 1.02rem;
    line-height: 1.6;
}

.message.user .message-content {
    background: #4A90E2;
    color: white;
}

.message.bot .message-content {
    background: white;
    border: 1px solid #B0E0E6;
}

/* 전문가 말풍선 */
.expert-bubble {
    width: 100%;
}
.expert-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    margin: 4px 6px 6px 6px;
}
.expert-bubble.style_analyst .message-content {
    border-left: 4px solid #4A90E2;
}
.expert-bubble.color_expert .message-content {
    border-left: 4px solid #87CEEB;
}
.expert-bubble.fitting_coordinator .message-content {
    border-left: 4px solid #B0E0E6;
}
.expert-bubble.complete .message-content {
    background: #F0F8FF;
}
.expert-products {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.product-thumb {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #B0E0E6;
}

.product-thumb { cursor: pointer; transition: transform 0.15s ease; }
.product-thumb:hover { transform: scale(1.03); }

@media (max-width: 992px) {
    .chat-body { flex-direction: column; }
    .product-panel { max-width: none; min-width: 100%; }
}

.message-time {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
    padding: 0 10px;
}

.chat-input-container {
    display: flex;
    gap: 10px;
    width: 100%;
}

#chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #B0E0E6;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

#chat-input:focus {
    border-color: #4A90E2;
}

.send-btn {
    padding: 12px 24px;
    background: #4A90E2;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.send-btn:hover {
    background: #357ABD;
}

.send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 쿠키 테스트 탭 */
.cookie-test-container h3,
.api-test-container h3 {
    color: #4A90E2;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.cookie-section,
.api-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #F0F8FF;
    border-radius: 10px;
    border: 1px solid #B0E0E6;
}

.cookie-section h4,
.api-section h4 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.input-group input,
.input-group select {
    padding: 10px 12px;
    border: 2px solid #B0E0E6;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    border-color: #4A90E2;
}

.btn {
    padding: 10px 20px;
    background: #4A90E2;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.btn:hover {
    background: #357ABD;
}

.result-box {
    background: white;
    border: 1px solid #B0E0E6;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    min-height: 50px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-all;
}

#api-body {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #B0E0E6;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    outline: none;
    resize: vertical;
    margin-bottom: 15px;
}

#api-body:focus {
    border-color: #4A90E2;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        margin-bottom: 5px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group input,
    .input-group select,
    .btn {
        width: 100%;
    }
    
    .chat-input-container {
        flex-direction: column;
    }
    
    .message-content {
        max-width: 85%;
    }
}

/* 로딩 애니메이션 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #ffa500;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

/* 스크롤바 스타일 */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 카카오 로그인 관련 스타일 */
.user-status-card {
    background: #F0F8FF;
    border: 2px solid #87CEEB;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(135, 206, 235, 0.2);
}

.login-prompt {
    text-align: center;
}

.login-prompt p {
    margin-bottom: 15px;
    color: #357ABD;
    font-size: 16px;
    font-weight: 500;
}

.kakao-login-btn {
    background: #FEE500;
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(254, 229, 0, 0.3);
}

.kakao-login-btn:hover {
    background: #FFE55C;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(254, 229, 0, 0.4);
}

.kakao-icon {
    font-size: 18px;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #E6F3FF;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #87CEEB;
}

.user-details h3 {
    margin: 0 0 5px 0;
    color: #357ABD;
    font-size: 18px;
}

.user-details p {
    margin: 2px 0;
    color: #4A90E2;
    font-size: 14px;
}

.user-id {
    font-size: 12px !important;
    color: #666 !important;
}

.logout-btn {
    background: #FF6B6B;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* 로그인 탭 스타일 */
.login-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.login-section {
    background: #F0F8FF;
    border: 2px solid #87CEEB;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(135, 206, 235, 0.2);
}

.login-section h4 {
    color: #357ABD;
    margin: 0 0 15px 0;
    font-size: 18px;
    border-bottom: 2px solid #87CEEB;
    padding-bottom: 8px;
}

.login-section p {
    color: #4A90E2;
    margin: 10px 0;
    line-height: 1.5;
}

.login-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #E6F3FF;
    border-radius: 8px;
    border: 1px solid #87CEEB;
}

.status-loading {
    color: #4A90E2;
    font-style: italic;
}

.status-logged-in {
    color: #2E7D32;
    font-weight: 600;
}

.status-logged-out {
    color: #D32F2F;
    font-weight: 600;
}

.status-icon {
    font-size: 18px;
}

.user-details {
    background: #E6F3FF;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #87CEEB;
}

.details-loading {
    color: #4A90E2;
    font-style: italic;
    text-align: center;
}

.details-content p {
    margin: 8px 0;
    color: #357ABD;
}

.details-content strong {
    color: #2C5F8B;
}

.details-error {
    color: #D32F2F;
    text-align: center;
    font-style: italic;
}

/* 가상피팅 탭 스타일 */
.virtual-fitting-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.fitting-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.fitting-header h3 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.fitting-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.fitting-body {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.fitting-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 800px;
}

.fitting-main .fitting-slot:nth-child(1) {
    grid-column: 1 / -1;
    max-width: 400px;
    margin: 0 auto;
}

.fitting-slot {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    height: 300px !important;
    min-height: 300px !important;
    max-height: 300px !important;
    flex-shrink: 0 !important;
}

.fitting-slot:hover {
    border-color: #6c5ce7;
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.15);
    transform: translateY(-2px);
}

.slot-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 12px 16px;
    font-weight: 700;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 1rem;
    text-align: center;
}

.slot-content {
    position: relative;
    width: 300px !important;
    min-height: 300px !important;
    height: 300px !important;
    background: white;
}

.slot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100% !important;
    height: 300px !important;
    color: #4a5568;
    text-align: center;
    padding: 15px 20px;
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    opacity: 0.7;
}

.upload-text {
    font-size: 0.95rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.slot-hint {
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
    margin-top: 4px;
    line-height: 1.3;
}

.upload-btn {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}
.placeholder-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2d3748;
}
.placeholder-sub {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #718096;
}

.upload-btn:hover {
    background: linear-gradient(135deg, #5a4fcf, #8b7fd8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
}

/* 랜덤 모델 이미지 버튼 스타일 */
.random-model-btn {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
    width: 100%;
}

.random-model-btn:hover {
    background: linear-gradient(135deg, #00a085, #00b894);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 184, 148, 0.4);
}

.random-model-btn .random-icon {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.random-model-btn:hover .random-icon {
    transform: rotate(180deg) scale(1.1);
}

.random-model-btn .btn-text {
    font-size: 0.9rem;
    font-weight: 600;
}

.slot-preview {
    position: relative;
    width: 100% !important;
    height: 300px !important;
    overflow: hidden;
    border-radius: 0 0 12px 12px;
}

.slot-image {
    width: 300px !important;
    height: 300px !important;
    max-width: 300px !important;
    max-height: 300px !important;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.slot-preview:hover .slot-image {
    transform: scale(1.05);
}

.remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.remove-btn:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

.fitting-actions {
    text-align: center;
    margin-top: auto;
}

.try-on-btn {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 16px rgba(0, 184, 148, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.try-on-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #00a085, #00b894);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 184, 148, 0.4);
}

.try-on-btn:disabled {
    background: linear-gradient(135deg, #ddd, #ccc);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    color: #999;
}

.fitting-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    color: #00b894;
    font-weight: 600;
    font-size: 1rem;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e9ecef;
    border-top: 3px solid #00b894;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fitting-result {
    margin-top: 24px;
    text-align: center;
    border: 3px solid #00b894;
    border-radius: 12px;
    padding: 20px;
    background: linear-gradient(145deg, #f0fff4, #e8f5e8);
    box-shadow: 0 4px 16px rgba(0, 184, 148, 0.2);
}

.result-header {
    font-weight: 700;
    color: #00b894;
    margin-bottom: 16px;
    font-size: 1.2rem;
}

.result-image {
    width: 100%;
    max-width: 240px;
    height: auto;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.download-btn {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

.download-btn:hover {
    background: linear-gradient(135deg, #00a085, #00b894);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.4);
}

.add-to-wardrobe-btn {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 12px;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(253, 121, 168, 0.3);
}

.add-to-wardrobe-btn:hover {
    background: linear-gradient(135deg, #e84393, #fd79a8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(253, 121, 168, 0.4);
}

/* 가이드 패널 스타일 */
.fitting-guide {
    width: 300px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 2px solid #dee2e6;
}

.guide-header {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    padding: 16px 20px;
    font-weight: 700;
    font-size: 1.2rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

.guide-content {
    padding: 24px;
}

.guide-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 24px;
    padding: 16px;
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.guide-step:hover {
    border-color: #00b894;
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.1);
    transform: translateY(-2px);
}

.guide-step:last-child {
    margin-bottom: 0;
}

.step-number {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    margin-right: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

.step-content h4 {
    margin: 0 0 8px 0;
    color: #2d3436;
    font-size: 1rem;
    font-weight: 600;
}

.step-content p {
    margin: 0;
    color: #636e72;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* 채팅 컨테이너 레이아웃 - 기존 박스 + 오른쪽 가상피팅 */
.chat-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}


/* 오른쪽 가상피팅 컴포넌트 */
.virtual-fitting-panel {
    width: 350px;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow-y: auto;
    border: 2px solid #dee2e6;
    max-height: calc(100vh - 280px);
    min-height: 500px;
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
}

/* 가상피팅 패널 스크롤바 스타일링 */
.virtual-fitting-panel::-webkit-scrollbar {
    width: 8px;
}

.virtual-fitting-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.virtual-fitting-panel::-webkit-scrollbar-thumb {
    background: #6c5ce7;
    border-radius: 4px;
}

.virtual-fitting-panel::-webkit-scrollbar-thumb:hover {
    background: #5a4fcf;
}

/* 강제 크기 적용 - 모델 슬롯은 세로 2배(600px), 나머지는 300px 유지 */
#model-slot {
    width: 300px !important;
    height: 600px !important;
    min-height: 600px !important;
    max-height: 600px !important;
    flex-shrink: 0 !important;
}
#top-slot, #bottom-slot {
    width: 300px !important;
    height: 300px !important;
    min-height: 300px !important;
    max-height: 300px !important;
    flex-shrink: 0 !important;
}

#model-placeholder {
    width: 100% !important;
    height: 600px !important;
    min-height: 600px !important;
    max-height: 600px !important;
    flex-shrink: 0 !important;
}
#top-placeholder, #bottom-placeholder {
    width: 100% !important;
    height: 300px !important;
    min-height: 300px !important;
    max-height: 300px !important;
    flex-shrink: 0 !important;
}

#model-preview {
    width: 100% !important;
    height: 600px !important;
    min-height: 600px !important;
    max-height: 600px !important;
    flex-shrink: 0 !important;
}
#top-preview, #bottom-preview {
    width: 100% !important;
    height: 300px !important;
    min-height: 300px !important;
    max-height: 300px !important;
    flex-shrink: 0 !important;
}

/* 슬롯 높이: 모델 슬롯만 600px, 나머지 300px */
#model-fslot {
    height: 600px !important;
    min-height: 600px !important;
    max-height: 600px !important;
}
.fitting-slot {
    height: 300px !important;
    min-height: 300px !important;
    max-height: 300px !important;
    flex-shrink: 0 !important;
}

/* 이미지 크기는 박스 크기와 동일하게 (300px) */
.slot-image { object-fit: cover; }
#model-image {
    width: 300px !important;
    height: 600px !important;
    max-width: 300px !important;
    max-height: 600px !important;
}
#top-image, #bottom-image {
    width: 300px !important;
    height: 300px !important;
    max-width: 300px !important;
    max-height: 300px !important;
}

.fitting-panel-header {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    padding: 16px 20px;
    font-weight: 700;
    font-size: 1.2rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

.fitting-panel-body {
    padding: 20px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 350px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 가상피팅 패널 바디 스크롤바 스타일링 */
.fitting-panel-body::-webkit-scrollbar {
    width: 8px;
}

.fitting-panel-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.fitting-panel-body::-webkit-scrollbar-thumb {
    background: #6c5ce7;
    border-radius: 4px;
}

.fitting-panel-body::-webkit-scrollbar-thumb:hover {
    background: #5a4fcf;
}

/* 반응형 디자인 */
@media (max-width: 1400px) {
    .chat-body {
        flex-direction: column;
        height: auto;
    }
    
    .wardrobe-panel {
        width: 100%;
        max-width: 400px;
        margin: 20px auto 0;
        height: auto;
    }
    
    .virtual-fitting-panel {
        width: 100%;
        max-width: 400px;
        margin: 20px auto 0;
        height: auto;
    }
}

@media (max-width: 768px) {
    .chat-container {
        gap: 15px;
    }
    
    .chat-body {
        gap: 15px;
    }
    
    .virtual-fitting-panel {
        margin: 15px 0 0 0;
    }
}

/* 옷장 아이템 스타일 */
.wardrobe-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wardrobe-item:hover {
    border-color: #6c5ce7;
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.15);
    transform: translateY(-3px);
}

.wardrobe-item-image {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 12px;
}

.wardrobe-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.wardrobe-remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
}

.wardrobe-remove-btn:hover {
    background: linear-gradient(135deg, #ee5a52, #ff6b6b);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.wardrobe-item-name {
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 12px;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.3;
}

.wardrobe-item-actions {
    display: flex;
    gap: 6px;
    width: 100%;
}

.wardrobe-action-btn {
    padding: 12px 8px;
    border: none;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.wardrobe-add-top-btn,
.wardrobe-add-bottom-btn {
    flex: 1;
}

.wardrobe-action-btn .btn-text {
    font-size: 0.8rem;
    font-weight: 600;
}

.wardrobe-add-top-btn {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    color: white;
    box-shadow: 0 2px 8px rgba(253, 121, 168, 0.3);
}

.wardrobe-add-top-btn:hover {
    background: linear-gradient(135deg, #e84393, #fd79a8);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(253, 121, 168, 0.4);
}

.wardrobe-add-bottom-btn {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

.wardrobe-add-bottom-btn:hover {
    background: linear-gradient(135deg, #00a085, #00b894);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.4);
}

.wardrobe-favorite-btn {
    background: linear-gradient(135deg, #ff7675, #e84393);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 118, 117, 0.3);
    min-width: 80px;
    padding: 12px 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.wardrobe-favorite-btn:hover {
    background: linear-gradient(135deg, #e84393, #ff7675);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 118, 117, 0.4);
}

.wardrobe-favorite-btn.favorited {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    animation: heartBeat 0.6s ease-in-out;
}

.wardrobe-favorite-btn .favorite-icon {
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.wardrobe-favorite-btn .btn-text {
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.wardrobe-favorite-btn:hover .favorite-icon {
    transform: scale(1.2);
}

.wardrobe-favorite-btn.favorited .favorite-icon {
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 상품 선택 모달 스타일 */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 2px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.modal-header h3 {
    margin: 0;
    color: #2d3436;
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e9ecef;
    color: #2d3436;
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

/* 모달 스크롤바 스타일링 */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #6c5ce7;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #5a4fcf;
}

.modal-product-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 2px solid #e9ecef;
}

.modal-product-info {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-info-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    border-left: 4px solid #6c5ce7;
}

.info-box-header {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-box-content {
    color: #2d3436;
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-product-link-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    text-align: center;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #4A90E2 0%, #6BB4FF 100%);
    box-shadow: 0 6px 14px rgba(74, 144, 226, 0.25);
    border: 1px solid rgba(74, 144, 226, 0.35);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.modal-product-link-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(74, 144, 226, 0.3);
}

.modal-add-to-wardrobe-btn {
    flex: 1;
    background: linear-gradient(135deg, #fd79a8, #e84393);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 6px 14px rgba(253, 121, 168, 0.25);
}

.modal-add-to-wardrobe-btn:hover {
    background: linear-gradient(135deg, #e84393, #fd79a8);
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(253, 121, 168, 0.3);
}
