/* Font Awesome 아이콘 폰트 추가 */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css');

/* 고양이 소리 번역기 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* 헤더 */
header {
    text-align: center;
    color: white;
}

/* 로고 스타일 */
.logo-img {
    width: 100px;
    height: 100px;
    margin-bottom: 15px;
    border-radius: 50%;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.logo-img:hover {
    transform: scale(1.1);
}

/* 로고 툴팁 */
header a[href="/index.html"] {
    position: relative;
    display: inline-block;
}

header a[href="/index.html"]::after {
    content: "캣팁 홈으로";
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

header a[href="/index.html"]::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-bottom-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

header a[href="/index.html"]:hover::after,
header a[href="/index.html"]:hover::before {
    opacity: 1;
    visibility: visible;
}

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

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

.subtitle {
    font-size: 0.95rem;
    color: #e0e0e0;
    font-weight: 400;
    margin-bottom: 0;
}

/* 메인 콘텐츠 */
.main-content {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 90px 30px 30px 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

/* 공유하기 버튼 */
.share-container {
    position: absolute;
    top: 24px;
    right: 32px;
    margin: 0;
    z-index: 10;
    display: flex;
    justify-content: flex-end;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #6c6fd1;
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: background 0.2s;
}

.share-btn:hover {
    background: #575abf;
}

.share-btn i {
    font-size: 1.1rem;
}

.share-dropdown {
    position: absolute;
    top: 55px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.share-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 0.9rem;
}

.share-option:hover {
    background: #f8f9fa;
    color: #667eea;
}

.share-option i {
    font-size: 1rem;
    width: 16px;
    text-align: center;
}

/* 모델 상태 */
.status-card {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    font-weight: 500;
}

.status-card.loading {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-card.ready {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-card.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-icon {
    font-size: 1.5rem;
    margin-right: 15px;
}

/* 입력 방법 선택 */
.input-methods {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.method-btn {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: white;
    color: #6c757d;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.method-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.method-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

/* 입력 섹션 */
.input-section {
    margin-bottom: 30px;
}

/* 녹음 컨트롤 */
.recording-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.record-btn {
    min-width: 180px;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 16px 0;
    border: none;
    border-radius: 12px;
    background: #667eea;
    color: white;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(102,126,234,0.08);
}

.record-btn:hover {
    background: #4a63c3;
}

.record-btn.stop {
    background: #dc3545;
}

.record-btn.stop:hover {
    background: #b52a37;
}

.file-upload-btn {
    background: #a7a7a7;
    color: white;
}

.file-upload-btn:hover {
    background: #1769aa;
}

/* 오디오 시각화 */
.audio-visualizer {
    margin-bottom: 15px;
}

#visualizer {
    width: 100%;
    height: 100px;
    border-radius: 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

/* 녹음 상태 */
.mic-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.mic-glow-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.mic-glow-effect {
    position: absolute;
    top: 50%; left: 50%;
    width: 360px; height: 200px;
    transform: translate(-50%, -50%);
    border-radius: 50% 50% 60% 60%/50% 50% 100% 100%;
    background: radial-gradient(ellipse at 50% 60%, 
        rgba(40,0,120,1) 0%,
        rgba(60,0,180,0.98) 20%,
        rgba(80,0,200,0.95) 35%,
        rgba(90,30,220,0.85) 55%,
        rgba(108,80,230,0.7) 75%,
        rgba(108,111,209,0.22) 95%,
        transparent 100%);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease;
    animation: micGlowPulse 0.65s infinite alternate, micGlowRotate 1.2s infinite linear, micGlowFloat 0.85s infinite ease-in-out alternate, micGlowHue 2s infinite linear;
    mix-blend-mode: screen;
    filter: blur(32px);
}

.mic-glow-wrapper.active .mic-glow-effect {
    opacity: 1;
    animation: micGlowPulse 0.65s infinite alternate, micGlowRotate 1.2s infinite linear, micGlowScale 0.7s infinite alternate, micGlowFloat 0.85s infinite ease-in-out alternate, micGlowHue 2s infinite linear;
}

.mic-glow-effect::before {
    content: '';
    position: absolute;
    top: 60%; left: 50%;
    width: 250px; height: 100px;
    transform: translate(-50%, -50%);
    border-radius: 50% 50% 80% 80%/60% 60% 100% 100%;
    background: radial-gradient(ellipse at 50% 80%, 
        rgba(255,255,255,0.38) 0%,
        rgba(108,80,230,0.38) 60%,
        transparent 100%);
    animation: innerGlow 0.65s infinite alternate, micGlowFloat 0.85s infinite ease-in-out alternate, micGlowHue 2s infinite linear;
    mix-blend-mode: overlay;
    z-index: 1;
}

.mic-glow-wrapper.active .mic-glow-effect::before {
    animation: innerGlow 0.65s infinite alternate, innerGlowRotate 0.9s infinite linear, micGlowFloat 0.85s infinite ease-in-out alternate, micGlowHue 2s infinite linear;
}

.cat-mic-image {
    position: relative;
    z-index: 2;
    transition: filter 0.4s;
    filter: drop-shadow(0 0 32px rgba(60,0,180,0.48)) 
            drop-shadow(0 0 64px rgba(80,0,200,0.22));
}

.mic-glow-wrapper.active .cat-mic-image {
    filter: drop-shadow(0 0 60px rgba(60,0,180,0.8)) 
            drop-shadow(0 0 120px rgba(80,0,200,0.38));
}

@keyframes micGlowPulse {
    0% { 
        filter: blur(20px) brightness(1);
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        filter: blur(48px) brightness(1.32);
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.22);
    }
    100% { 
        filter: blur(64px) brightness(1.55);
        opacity: 0.95;
        transform: translate(-50%, -50%) scale(1.32);
    }
}

@keyframes micGlowRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes micGlowScale {
    0% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-50%, -50%) scale(1.22); }
}

@keyframes micGlowFloat {
    0% { transform: translate(-50%, -50%) scale(1) translateY(0); }
    100% { transform: translate(-50%, -50%) scale(1) translateY(32px); }
}

@keyframes micGlowHue {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(80deg); }
}

@keyframes innerGlow {
    0% { 
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.22);
    }
}

@keyframes innerGlowRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(-360deg); }
}

div#audioFeedbackBox {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translate(-50%, -70%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    width: 100%;
    min-height: 140px;
    justify-content: flex-start;
}

.recording-status {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    font-size: 2rem;
    color: #666;
    text-align: center;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 8px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s;
}

.audio-feedback {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: 600;
    min-width: 110px;
    max-width: 160px;
    height: 24px;
    margin: 0 auto 0 auto;
    text-align: center;
    transition: background 0.2s, min-width 0.2s, font-size 0.2s, opacity 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    z-index: 11;
    opacity: 0;
    visibility: hidden;
    background: transparent;
    box-shadow: none;
    border: none;
}

.audio-feedback.success {
    background: rgba(76, 175, 80, 0.85);
    color: #fff;
    opacity: 1;
    visibility: visible;
    box-shadow: 0 1px 4px rgba(33,150,243,0.08);
}
.audio-feedback.warning {
    background: rgba(255, 152, 0, 0.85);
    color: #fff;
    opacity: 1;
    visibility: visible;
    box-shadow: 0 1px 4px rgba(33,150,243,0.08);
}
.audio-feedback.listening {
    background: rgba(100, 100, 100, 0.7);
    color: #fff;
    opacity: 1;
    visibility: visible;
    box-shadow: 0 1px 4px rgba(33,150,243,0.08);
}

.recording-status, #recordingTimeDisplay {
    margin-top: 8px !important;
    font-size: 2rem;
    color: #666;
    text-align: center;
    font-weight: 500;
    letter-spacing: 1px;
}

/* 파일 업로드 */
.file-upload {
    text-align: center;
}

.upload-btn {
    padding: 15px 30px;
    border: 2px dashed #667eea;
    border-radius: 10px;
    background: #f8f9ff;
    color: #667eea;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.upload-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.file-info {
    margin-top: 15px;
}

.file-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
}

.file-name {
    font-weight: 500;
    color: #495057;
}

.file-size {
    color: #6c757d;
}

/* 로딩 */
.loading {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* 오류 메시지 */
.error-message {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 10px;
    margin-top: 20px;
}

.error-icon {
    font-size: 1.2rem;
    margin-right: 15px;
}

/* 사용법 안내 */
.instructions {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.instructions h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #495057;
    font-size: 1.5rem;
}

.instruction-steps {
    display: grid;
    gap: 20px;
}

.step {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.step-number {
    width: 40px;
    height: 40px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.step p {
    margin: 0;
    line-height: 1.5;
    font-size: 0.9rem !important;
}

/* 정확도 안내 스타일 */
.accuracy-notice {
    margin-top: 30px;
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    border-left: 4px solid #ffc107;
}

.accuracy-notice h4 {
    color: #856404;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notice-content p {
    margin-bottom: 15px;
    color: #856404;
    line-height: 1.6;
    font-size: 0.9em;
}

.notice-content ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.notice-content li {
    margin-bottom: 8px;
    color: #856404;
    line-height: 1.5;
    font-size: 0.8em;
}

.notice-content strong {
    color: #6c5700;
}

.fun-note {
    text-align: center;
    font-weight: 600;
    color: #856404;
    font-size: 1.1rem;
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .input-methods {
        flex-direction: column;
    }
    
    .recording-controls {
        flex-direction: column;
    }
    
    .result-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .probability-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .mic-image-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin: 0 auto 40px auto;
    }
    
    .cat-mic-image {
        width: 90vw;
        max-width: 320px;
        height: auto;
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .mic-image-wrapper {
        flex-direction: column;
        margin-top: 48px !important;
        margin-bottom: 40px;
    }
    .main-content {
        padding-top: 48px !important;
    }
    .mini-analysis {
        margin-right: 0;
        margin-bottom: 16px;
        width: 90vw;
        max-width: 220px;
        min-width: 120px;
    }
}

.mini-analysis {
    position: absolute;
    left: 120px;
    top: 50%;
    transform: translate(-110%, -50%);
    width: 120px;
    min-width: 90px;
    max-width: 140px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 12px;
    margin-bottom: 4px;
}

.mini-analysis:empty {
    display: none !important;
}

.mini-analysis .mini-row {
    margin-bottom: 10px;
}

.mini-analysis .mini-meaning {
    font-weight: bold;
    font-size: 0.75rem;
    margin-bottom: 2px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-analysis .mini-bar {
    width: 100%;
    height: 12px;
    border-radius: 8px;
    background: #e0e0e0;
    position: relative;
    margin-bottom: 2px;
    overflow: hidden;
}

.mini-analysis .mini-bar-fill {
    height: 100%;
    border-radius: 8px;
    position: absolute;
    left: 0; top: 0;
    transition: width 0.3s;
}

.mini-analysis .mini-bar-fill.color1 { background: linear-gradient(90deg, #42a5f5, #1976d2); }
.mini-analysis .mini-bar-fill.color2 { background: linear-gradient(90deg, #66bb6a, #388e3c); }
.mini-analysis .mini-bar-fill.color3 { background: linear-gradient(90deg, #ffa726, #f57c00); }
.mini-analysis .mini-label {
    font-size: 0.7rem;
    color: #888;
    margin-right: 2px;
}
.mini-analysis .mini-value {
    font-size: 0.7rem;
    color: #1976d2;
}

#statusBubble,
#statusBubble.active,
#statusBubble.status-start,
#statusBubble.status-stop,
#statusBubble.status-error,
#statusBubble.status-loading,
#statusBubble.result-active {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -30%);
    margin: 0;
    min-width: 300px;
    max-width: 420px;
    padding: 14px 20px;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 500;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(33,150,243,0.10);
    z-index: 10;
    display: none;
    transition: opacity 0.3s;
    pointer-events: none;
    text-align: left;
    padding-bottom: 24px;
}
#statusBubble.active {
    display: block;
    opacity: 1;
    animation: bubblePop 0.3s;
}
#statusBubble.status-start { background: rgba(33,150,243,0.5); }
#statusBubble.status-stop { background: rgba(108,117,125,0.5); }
#statusBubble.status-error { background: rgba(229,57,53,0.5); }
#statusBubble.status-loading { background: rgba(25,118,210,0.5); }
#statusBubble.result-active { 
    background: #4caf50; 
    color: #fff; 
    top: 20px;
    transform: translate(-50%, -20%);
}
#statusBubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px 10px 0 10px;
    border-style: solid;
    display: block;
}
#statusBubble.status-start::after { border-color: rgba(33,150,243,0.5) transparent transparent transparent; }
#statusBubble.status-stop::after { border-color: rgba(108,117,125,0.5) transparent transparent transparent; }
#statusBubble.status-error::after { border-color: rgba(229,57,53,0.5) transparent transparent transparent; }
#statusBubble.status-loading::after { border-color: rgba(25,118,210,0.5) transparent transparent transparent; }
#statusBubble.result-active::after { border-color: #4caf50 transparent transparent transparent; }

.mic-analyze-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 40px;
}

#statusBubble .mini-analysis {
    margin-top: 16px;
    margin-bottom: 0;
    background: rgba(255,255,255,0.95);
    box-shadow: none;
    border-radius: 10px;
    padding: 10px;
    width: 100%;
    max-width: 260px;
    min-width: 0;
    position: static;
    transform: none;
}

/* 홈으로 돌아가기 버튼 */
.home-link {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    position: relative;
}

.home-btn::before {
    content: "\f015";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 8px;
    font-size: 1rem;
}

.home-btn:hover {
    background: #4a63c3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.home-btn i {
    font-size: 1rem;
}

/* AI 모델 다운로드 확인 모달 */
.modal-overlay {
    position: fixed;
    left: 0; top: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.18);
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    background: none;
    border-radius: 0;
    box-shadow: 0 6px 24px rgba(102,126,234,0.13);
    width: 100%;
    max-width: 400px;
    min-width: 0;
    box-sizing: border-box;
    padding: 0 !important;
    text-align: center;
    z-index: 999;
    border: none;
    font-size: 0.98rem;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 0 !important;
    box-shadow: 0 8px 32px rgba(102,126,234,0.18);
}

.modal-header {
    background: linear-gradient(90deg, #7b5de3 0%, #4a90e2 100%);
    color: #fff;
    border-radius: 18px 18px 0 0;
    padding: 16px 24px 6px 24px;
    font-size: 1.01rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    background: #fff;
    border-radius: 0 0 18px 18px;
    padding: 0 0 18px 0;
    box-sizing: border-box;
    width: 100%;
    margin: 0 !important;
}

.modal-header h2 {
    font-size: 1.13rem;
    font-weight: 700;
    margin: 0 0 0 18px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.modal-header .close {
    font-size: 1.7rem;
    font-weight: 400;
    margin-right: 18px;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.15s;
}
.modal-header .close:hover { opacity: 1; }

.model-info {
    padding: 0 18px 0 18px;
}

.info-card {
    background: #f8fafd;
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 12px 12px 8px 12px;
    box-shadow: 0 1px 4px rgba(102,126,234,0.04);
    font-size: 0.98em;
}

.info-title {
    font-weight: 600;
    font-size: 1.01em;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-row {
    margin: 2px 0;
    font-size: 0.98em;
    text-align: left;
}

.modal-footer-fixed {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 10px 18px 0 18px;
}

.modal-footer-fixed .btn {
    min-width: 0;
    font-size: 0.8rem !important;
    font-weight: 600;
    border: none;
    border-radius: 14px;
    padding: 8px 0;
    box-shadow: 0 1px 2px rgba(102,126,234,0.06);
    transition: background 0.18s, box-shadow 0.18s, color 0.18s, transform 0.18s;
    cursor: pointer;
    margin: 0 2px;
    outline: none;
    letter-spacing: -0.5px;
    flex: 1 1 0;
    max-width: 120px;
    user-select: none;
}
.modal-footer-fixed .btn-primary {
    background: linear-gradient(90deg, #7b9eea 0%, #a7aee3 100%);
    color: #fff;
    border: 1.2px solid #7b5de3;
}
.modal-footer-fixed .btn-primary:hover {
    background: linear-gradient(90deg, #4a90e2 0%, #7b5de3 100%);
    filter: brightness(1.04);
    transform: translateY(-1px) scale(1.01);
}
.modal-footer-fixed .btn-secondary {
    background: #f3f4fa;
    color: #4a63c3;
    border: 1.2px solid #b0b6d6;
}
.modal-footer-fixed .btn-secondary:hover {
    background: #e3e6f3;
    color: #2d3a7b;
    filter: brightness(1.04);
    transform: translateY(-1px) scale(1.01);
}

/* 로봇 안내 메시지 */
.robot-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.robot-icon {
    font-size: 4rem;
    animation: robotBounce 2s infinite;
}

@keyframes robotBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.robot-text h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.3rem;
}

.robot-text p {
    margin: 0 0 10px 0;
    color: #666;
    line-height: 1.6;
}

/* 비활성화된 버튼 스타일 */
.disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}

.disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* 파일 업로드 라벨 비활성화 */
.file-upload-label.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.file-upload-label.disabled:hover {
    background: var(--primary-color);
    transform: none;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* 고양이 소리 번역기 결과 스타일 - 더 강한 구분 */
.bubble-meaning {
  font-size: 1.08em;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.2em;
  line-height: 1.35;
  letter-spacing: -0.2px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.18);
}

.bubble-action {
  font-size: 0.98em;
  color: #e3f2fd;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-top: 0.1em;
  font-style: italic;
  display: block;
  font-weight: 400;
  text-shadow: 0 1px 6px rgba(0,0,0,0.12);
}

.modal-essentials {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.92rem;
    padding: 14px 8px 0 8px;
    text-align: center;
}
.essentials-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.modal-details {
    margin: 0;
    padding: 0 8px 8px 8px;
    font-size: 0.91rem;
}
.modal-details summary {
    cursor: pointer;
    font-size: 0.91rem;
    color: #667eea;
    margin: 10px 0 8px 0;
    outline: none;
    text-align: left;
}
.modal-details[open] summary {
    margin-bottom: 8px;
}
@media (max-width: 768px) {
    .modal-essentials {
        font-size: 0.89rem;
        padding: 10px 4px 0 4px;
    }
    .modal-details {
        font-size: 0.88rem;
        padding: 0 4px 6px 4px;
    }
    .essentials-row {
        gap: 8px;
    }
}

#modalOverlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    z-index: 998;
    /* 필요시 배경색: background: rgba(0,0,0,0.2); */
}

#modelDownloadModal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 420px;
    min-width: 0;
    background: white;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
    padding: 24px 12px 20px 12px;
    text-align: center;
    z-index: 999;
}

@media (max-width: 600px) {
    #modelDownloadModal {
        width: 95vw;
        max-width: 98vw;
        min-width: 0;
        padding: 20px 6px 16px 6px;
    }
}

body, html {
    overflow-x: hidden;
}

.modal-footer-fixed {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-top: 18px;
}
.modal-footer-fixed .btn {
    min-width: 140px;
    font-size: 1.08rem;
    font-weight: 700;
    border: none;
    border-radius: 32px;
    padding: 15px 0;
    box-shadow: 0 2px 8px rgba(102,126,234,0.10);
    transition: background 0.18s, box-shadow 0.18s, color 0.18s, transform 0.18s;
    cursor: pointer;
    margin: 0 2px;
    outline: none;
    letter-spacing: -0.5px;
    flex: 1 1 0;
    max-width: 220px;
    user-select: none;
}
.modal-footer-fixed .btn-primary {
    background: linear-gradient(90deg, #4a90e2 0%, #7b5de3 100%);
    color: #fff;
    box-shadow: 0 4px 16px #7b5de322;
    border: 2px solid #7b5de3;
}
.modal-footer-fixed .btn-primary:hover {
    background: linear-gradient(90deg, #357abd 0%, #5a3fcf 100%);
    filter: brightness(1.09);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 24px #7b5de344;
}
.modal-footer-fixed .btn-secondary {
    background: linear-gradient(90deg, #e3e6f3 0%, #c7cbe6 100%);
    color: #4a63c3;
    box-shadow: 0 2px 8px #c7cbe622;
    border: 2px solid #b0b6d6;
}
.modal-footer-fixed .btn-secondary:hover {
    background: linear-gradient(90deg, #c7cbe6 0%, #b0b6d6 100%);
    color: #2d3a7b;
    filter: brightness(1.09);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 18px #b0b6d655;
}

.robot-message {
  display: none;
  position: fixed;
  z-index: 2001;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #f8fafd;
  border-radius: 18px;
  box-shadow: 0 4px 18px rgba(102,126,234,0.10);
  width: 100%;
  max-width: 340px;
  min-width: 0;
  box-sizing: border-box;
  padding: 32px 18px 24px 18px;
  text-align: center;
  font-size: 0.93rem;
  color: #222;
  opacity: 1;
  pointer-events: auto;
  line-height: 1.7;
}

.robot-message h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 12px 0;
}

.robot-message .robot-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.robot-message .refresh-btn {
  display: inline-block;
  margin-top: 18px;
  padding: 8px 0;
  width: 100%;
  max-width: 180px;
  font-size: 0.93rem;
  font-weight: 600;
  border: none;
  border-radius: 14px;
  background: linear-gradient(90deg, #7b9eea 0%, #a7aee3 100%);
  color: #fff;
  box-shadow: 0 1px 2px rgba(102,126,234,0.06);
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, color 0.18s, transform 0.18s;
}
.robot-message .refresh-btn:hover {
  background: linear-gradient(90deg, #4a90e2 0%, #7b5de3 100%);
  filter: brightness(1.04);
  transform: translateY(-1px) scale(1.01);
}

.robot-overlay {
  display: none;
  position: fixed;
  left: 0; top: 0;
  width: 100vw; height: 100vh;
  background: rgba(60,70,120,0.18);
  z-index: 2000;
}

.recent-results-stack {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 2002;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  max-width: 220px;
  pointer-events: auto;
}
.recent-result-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px #0002;
  padding: 13px 38px 13px 20px;
  font-size: 0.8rem;
  color: #333;
  position: relative;
  min-width: 120px;
  max-width: 220px;
  pointer-events: auto;
  display: flex;
  align-items: center;
  transition: box-shadow 0.2s, background 0.2s, color 0.2s, opacity 0.2s;
  font-weight: 500;
  letter-spacing: -0.5px;
}
.recent-result-card.recent-0 {
  background: linear-gradient(120deg, #e3fcec 0%, #c8e6c9 60%, #b2f7c1 100%);
  color: #1b5e20;
  font-weight: 700;
  opacity: 1;
  box-shadow: 0 4px 18px #4caf5022;
}
.recent-result-card.recent-1 {
  background: linear-gradient(120deg, #e3fcec 0%, #c8e6c9 60%, #b2f7c1 100%);
  color: #1b5e20;
  opacity: 0.7;
}
.recent-result-card.recent-2 {
  background: linear-gradient(120deg, #e3fcec 0%, #c8e6c9 60%, #b2f7c1 100%);
  color: #1b5e20;
  opacity: 0.4;
}
.recent-result-card .delete-btn {
  position: absolute;
  right: 8px;
  top: 8px;
  background: none;
  border: none;
  color: #f44336;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s;
}
.recent-result-card .delete-btn:hover {
  background: #f4433622;
}
.recent-results-stack .clear-all-btn {
  background: linear-gradient(90deg, #ff5252 0%, #ff8a65 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 4px;
  cursor: pointer;
  align-self: flex-end;
  transition: background 0.15s, color 0.15s;
}
.recent-results-stack .clear-all-btn:hover {
  background: linear-gradient(90deg, #d32f2f 0%, #ff7043 100%);
  color: #fff;
} 