/* Corporate AI SaaS Style */

/* Import modern fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Privacy Notice Styling */
.upload-note {
    color: #6B7280;
    font-size: 12px;
    margin-top: 8px;
    margin-bottom: 12px;
    line-height: 1.4;
    text-align: center;
}

/* Hide any remaining pixel art elements */
[class*="pixel"], [id*="pixel"], 
.modal:has(*[class*="픽셀"]), 
.modal:has(*:contains("픽셀아트")),
.modal:has(*:contains("만들어보세요")),
*:contains("커플 사진을 픽셀아트로"),
*:contains("픽셀아트 만들어보기"),
/* Hide pixel art cards on main page */
.card:has(h3:contains("픽셀아트")),
.card:has(*:contains("커플 사진을 픽셀아트로")),
.card:has(a[href="/pixelize"]),
a[href="/pixelize"],
/* Force hide 4th card if it contains pixel art */
.feature-grid .card:nth-child(4):has(*:contains("픽셀")),
.feature-grid .card:last-child:has(a[href="/pixelize"]) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

:root {
    --primary-color: #FEE500;
    --secondary-color: #333333;
    --accent-color: #FEE500;
    --base-bg: #ffffff;
    --text-primary: #000000;
    --text-secondary: #333333;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    --card-hover-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-color: #e5e7eb;
    --bg-light: #f9fafb;
    --kakao-yellow: #FEE500;
    --kakao-yellow-hover: #E5D100;
    --black: #000000;
}

/* Global Body Styles */
html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Ensure all elements use border-box sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* BASE Brand Header */
.base-header {
    background: white;
    border-bottom: 1px solid #e5e5e5;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.base-logo {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    color: #000000;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.base-logo:hover {
    color: #000000;
    text-decoration: none;
}

/* Hero Section */
.hero-section {
    background: var(--base-bg);
    border-radius: 12px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

/* KakaoTalk Style Banner */
.kakaotalk-banner {
    background: #FEE500 !important;
    color: #191919 !important;
    padding: 8px 12px !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
    display: inline-block !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    margin-top: 1rem !important;
    text-align: center !important;
    border: 1px solid rgba(25, 25, 25, 0.1) !important;
}

/* Login Gate Styles */
.login-gate-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.login-gate-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #FEE500, #E5D100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: #000000;
    font-size: 2rem;
}

.login-gate-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-gate-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.analysis-preview {
    background: var(--base-bg);
    border-radius: 12px;
    margin-bottom: 2rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.analysis-preview-header {
    background: var(--primary-color);
    color: #000000;
    padding: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-preview-content {
    position: relative;
    height: 120px;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-text {
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.login-benefits {
    margin-bottom: 2rem;
}

.login-benefits h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.login-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.login-benefits li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--text-secondary);
}

.login-benefits li i {
    color: #FEE500;
    font-size: 0.9rem;
}

.kakao-login-btn {
    width: 100%;
    background: #FEE500;
    color: #191919;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(254, 229, 0, 0.3);
}

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

.kakao-login-btn img {
    width: 24px;
    height: 24px;
}

.login-notice {
    background: rgba(254, 229, 0, 0.1);
    border: 1px solid rgba(254, 229, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.login-notice i {
    color: var(--primary-color);
    margin-top: 0.1rem;
}

/* Hero Section Styling */
.hero-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.hero-seo-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Mobile Responsive Layout Fixes */
@media (max-width: 768px) {
    .container {
        max-width: 100% !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .container-fluid {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .col-lg-6, .col-md-8, .col-lg-8, .col-md-10 {
        padding-left: 4px !important;
        padding-right: 4px !important;
        max-width: 100% !important;
    }
    
    .card, .upload-area-clean, .extracted-text-container {
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
    }
    
    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
    }
    
    /* Ensure form elements don't exceed container */
    .form-control, textarea, .btn {
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Responsive Hero Section */
@media (max-width: 768px) {
    .hero-main-title {
        font-size: 2rem;
    }
    
    .hero-seo-title {
        font-size: 1.25rem;
    }
}

.hero-section .lead {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Navigation Styling */
nav {
    margin-bottom: 1rem;
    position: relative;
    z-index: 1000;
    clear: both;
}

nav .btn {
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    background: white;
    transition: all 0.2s ease;
    box-shadow: var(--card-shadow);
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    position: relative;
    z-index: 1000;
    pointer-events: auto;
}

nav .btn:hover {
    background: var(--primary-color);
    color: #000000;
    transform: translateY(-1px);
    box-shadow: var(--card-hover-shadow);
}

nav .btn i {
    transition: transform 0.2s ease;
}

/* Upload Area Micro-interactions */
.upload-area-clean {
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.upload-area-clean:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(254, 229, 0, 0.15);
}

/* Click effect */
.upload-area-clean.clicked {
    border-color: #FEE500 !important;
    box-shadow: 0 0 0 4px rgba(254, 229, 0, 0.3), 0 0 20px rgba(254, 229, 0, 0.4);
    animation: uploadGlow 0.3s ease-out;
}

/* Success state */
.upload-area-clean.success {
    border-color: #22C55E !important;
    background: linear-gradient(135deg, #f0fdf4 0%, #f7fee7 100%) !important;
}

.upload-area-clean.success::after {
    content: '✔️';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    animation: checkmarkAppear 0.5s ease-out;
}

/* Glow animation */
@keyframes uploadGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(254, 229, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(254, 229, 0, 0.3), 0 0 25px rgba(254, 229, 0, 0.4);
    }
    100% {
        box-shadow: 0 0 0 4px rgba(254, 229, 0, 0.3), 0 0 20px rgba(254, 229, 0, 0.4);
    }
}

/* Checkmark animation */
@keyframes checkmarkAppear {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* File upload button hover effect */
.upload-area-clean .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

nav .btn:hover i {
    transform: translateX(-2px);
}

/* Corporate Feature Cards */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: white;
    box-shadow: var(--card-shadow);
    transition: all 0.2s ease;
    max-width: 340px;
    margin: 0 auto;
}

.card:hover {
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-2px);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.card-icon i {
    font-size: 2rem;
    color: var(--primary-color);
}

.card h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.card .badge {
    background: var(--bg-light);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 20px;
}

.card-button {
    background: var(--primary-color);
    color: #000000;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.card-button:hover {
    background: var(--kakao-yellow-hover);
    color: #000000;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        max-width: 100%;
    }
    
    .hero-section {
        padding: 2rem 1rem;
    }
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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



/* Card Styles */
.card {
    border: none;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    background-color: white;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Button Styles */
.btn-primary {
    background: var(--primary-color);
    border: none;
    border-radius: 15px;
    font-weight: 500;
    padding: 12px 30px;
    font-size: 1rem;
    color: #000000;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--kakao-yellow-hover);
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(254, 229, 0, 0.3);
}

.btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 20px;
}

/* Upload Section */
.upload-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.upload-section h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Main upload area for affection analyzer */
.upload-area-main {
    border: 3px dashed var(--primary-color);
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(254, 229, 0, 0.05), rgba(254, 229, 0, 0.02));
    margin: 20px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-area-main:hover {
    border-color: var(--kakao-yellow-hover);
    background: linear-gradient(135deg, rgba(254, 229, 0, 0.1), rgba(254, 229, 0, 0.05));
    transform: translateY(-2px);
}

.upload-area-main.drag-over {
    border-color: #28a745;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(40, 167, 69, 0.05));
    transform: scale(1.02);
}

/* Click ripple effect for upload-area-main */
.upload-area-main::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(254, 229, 0, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

.upload-area-main.clicked::before {
    width: 300px;
    height: 300px;
    transition: width 0.4s ease, height 0.4s ease;
}

.upload-area-main.clicked {
    animation: clickPulse 0.3s ease;
}

/* Upload area clean variant */
.upload-area-clean {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area-clean::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(254, 229, 0, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

.upload-area-clean.clicked::before {
    width: 300px;
    height: 300px;
    transition: width 0.4s ease, height 0.4s ease;
}

.upload-area-clean.clicked {
    animation: clickPulse 0.3s ease;
}

/* Ensure content stays above ripple for all upload areas */
.upload-area-main > *,
.upload-area-clean > * {
    position: relative;
    z-index: 2;
}

.upload-message {
    padding: 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(254, 229, 0, 0.1), rgba(254, 229, 0, 0.05));
    border: 1px solid rgba(254, 229, 0, 0.2);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Hero Section */
.hero-section {
    position: relative;
    z-index: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.02) 0%, transparent 70%);
    z-index: -1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(10px, -10px) rotate(1deg); }
    66% { transform: translate(-5px, 5px) rotate(-1deg); }
}

.heart-decoration {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.heart-decoration i {
    color: var(--primary-color);
    font-size: 1.5rem;
    animation: heartbeat 2s ease-in-out infinite;
}

.heart-decoration i:nth-child(2) {
    animation-delay: 0.3s;
    font-size: 2rem;
}

.heart-decoration i:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Cards */
.card {
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--shadow-soft);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.bg-gradient-romantic {
    background: var(--gradient-clean);
}

.card-header {
    border-bottom: none;
    padding: 1.5rem 2rem;
}

.card-body {
    padding: 2rem;
}

/* Form Elements */
.chat-input {
    border-radius: 15px;
    border: 2px solid #e9ecef;
    padding: 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 300px;
}

.chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(254, 229, 0, 0.25);
}

.form-label {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

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

/* Buttons */
.btn-romantic {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    color: #000000;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.btn-romantic:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(254, 229, 0, 0.4);
    background: var(--primary-color);
    color: #000000;
}

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

/* Loading State */
.spinner-border {
    animation: heartPulse 1.5s infinite;
}

@keyframes heartPulse {
    0%, 100% { 
        transform: scale(1);
        border-color: var(--primary-color) transparent var(--primary-color) transparent;
    }
    50% { 
        transform: scale(1.1);
        border-color: var(--accent-color) transparent var(--accent-color) transparent;
    }
}

/* Results Section */
.diagnosis-summary {
    padding: 2rem;
    background: var(--gradient-subtle);
    border-radius: 20px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.diagnosis-summary::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: shimmer 3s linear infinite;
}

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

.diagnosis-emoji {
    animation: bounce 2s infinite;
}

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

.diagnosis-text {
    font-size: 2rem;
    background: var(--gradient-romantic);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Secondary Button (Black with White Text) */
.btn-secondary-custom {
    background: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary-custom:hover {
    background: #333333;
    border-color: #333333;
    color: #ffffff;
    transform: translateY(-1px);
}

/* Yellow CTA Button Variations */
.btn-cta-yellow {
    background: var(--primary-color);
    color: #000000;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-cta-yellow:hover {
    background: var(--kakao-yellow-hover);
    color: #000000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(254, 229, 0, 0.3);
}

.btn-cta-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 12px;
}

/* Affection Indicators */
.indicator-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.indicator-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.indicator-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.indicator-values {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.indicator-value {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    border-radius: 10px;
    font-weight: 500;
}

/* Color coding for indicator values - Enhanced contrast */
.indicator-value-new .value.excellent {
    color: #0d5e1a !important; /* Level 5: Dark green for 🔥🤩🚀 */
    font-weight: 700;
    background: rgba(40, 167, 69, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.indicator-value-new .value.positive {
    color: #0f5132 !important; /* Level 4: Green for 🌸😍⚡ */
    font-weight: 600;
}

.indicator-value-new .value.neutral {
    color: #495057 !important; /* Level 3: Gray for 🌱😀🙂 */
    font-weight: 500;
}

.indicator-value-new .value.low {
    color: #fd7e14 !important; /* Level 2: Orange for ❄️😐🐌 */
    font-weight: 600;
}

.indicator-value-new .value.negative {
    color: #842029 !important; /* Level 1: Red for 🧊🚫🐢 */
    font-weight: 600;
    background: rgba(220, 53, 69, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

/* Also support old structure for backward compatibility */
.indicator-value .value-text.positive {
    color: #198754 !important; /* Bootstrap success green */
    font-weight: 600;
}

.indicator-value .value-text.negative {
    color: #dc3545 !important; /* Bootstrap danger red */
    font-weight: 600;
}

.indicator-value .value-text.neutral {
    color: #6c757d !important; /* Bootstrap secondary gray */
    font-weight: 500;
}

.indicator-value.you {
    background: rgba(254, 229, 0, 0.1);
    color: #000000;
    border: 2px solid rgba(254, 229, 0, 0.2);
}

.indicator-value.partner {
    background: rgba(254, 229, 0, 0.1);
    color: #333333;
    border: 2px solid rgba(254, 229, 0, 0.2);
}

.value-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    opacity: 0.7;
}

.value-text {
    font-size: 1.1rem;
    font-weight: bold;
}

/* Tips Section */
.tips-container {
    display: grid;
    gap: 1rem;
}

.tip-item {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.tip-item::before {
    content: '💡';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
}

.tip-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.tip-item:nth-child(even) {
    border-left-color: var(--accent-color);
}

.tip-item:nth-child(3n) {
    border-left-color: var(--secondary-color);
}

/* Error States */
.alert-danger {
    border-radius: 15px;
    border: none;
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

/* Global Mobile Responsiveness */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

/* Container and Layout Fixes */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Card Responsiveness */
.card {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.card-body {
    padding: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    /* Force all containers to be 100% width with minimal padding */
    .container, .container-fluid, .container-sm, .container-md, .container-lg, .container-xl {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Ensure all main content containers fill width */
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .col, .col-12, .col-md-8, .col-lg-6, .col-xl-4,
    [class*="col-"] {
        padding-left: 4px !important;
        padding-right: 4px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 1rem !important;
        border-radius: 12px;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    /* Hero Section */
    .hero-section {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 1.5rem 1rem !important;
        text-align: center;
    }
    
    /* KakaoTalk Banner Mobile */
    .kakaotalk-banner {
        padding: 6px 10px !important;
        font-size: 0.9rem !important;
        border-radius: 8px !important;
        margin-top: 0.75rem !important;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .hero-section p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    /* Character Image */
    .character-image {
        width: 60px;
        height: 60px;
        margin: 0 auto 1rem;
    }
    
    /* Upload Area */
    .upload-area {
        padding: 2rem 1rem;
        margin: 1rem 0;
        border-radius: 12px;
        text-align: center;
    }
    
    .upload-area h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .upload-area p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    /* File Upload */
    .file-upload-label {
        width: 100%;
        padding: 1rem;
        font-size: 0.9rem;
        border-radius: 10px;
        text-align: center;
        cursor: pointer;
        display: block;
        margin: 1rem 0;
    }
    
    /* Selected Files */
    .selected-files {
        margin: 1rem 0;
    }
    
    .file-item {
        padding: 0.75rem;
        margin: 0.5rem 0;
        border-radius: 8px;
        font-size: 0.9rem;
    }
    
    /* Buttons */
    .btn-romantic {
        width: 100%;
        padding: 1rem 2rem;
        font-size: 1rem;
        border-radius: 25px;
        margin: 1rem 0;
        border: none;
        box-shadow: 0 4px 15px rgba(254, 229, 0, 0.3);
    }
    
    .btn-romantic:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }
    
    /* Additional Mobile Layout Fixes for Analysis Pages */
    .upload-area-clean {
        padding: 20px 10px !important;
        margin-bottom: 15px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
    }
    
    /* Result sections */
    #resultsSection {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* AI speech bubbles */
    .ai-speech-bubble {
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
        padding: 15px 10px !important;
    }
    
    /* Text areas and inputs */
    .chat-input, .form-control {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
    }
    
    /* Loading and result states */
    #loadingState, .results-section {
        padding-left: 10px !important;
        padding-right: 10px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Bootstrap column overrides */
    .col-lg-6, .col-md-8, .col-lg-8, .col-md-10 {
        padding-left: 4px !important;
        padding-right: 4px !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Extracted text containers */
    .extracted-text-container {
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    /* Results Section */
    .results-section {
        margin-top: 2rem;
    }
    
    /* Diagnosis Summary */
    .diagnosis-summary {
        padding: 1.5rem;
        margin: 1rem 0;
        border-radius: 12px;
        text-align: center;
    }
    
    .diagnosis-text {
        font-size: 1.3rem;
        line-height: 1.4;
        margin-bottom: 1rem;
    }
    
    .season-display {
        font-size: 1.1rem;
        margin: 0.5rem 0;
    }
    
    .score-display {
        font-size: 2rem;
        margin: 1rem 0;
    }
    
    /* Cooing Character */
    .cooing-character {
        text-align: center;
        margin: 1.5rem 0;
    }
    
    .cooing-character img {
        width: 80px;
        height: 80px;
        margin-bottom: 1rem;
    }
    
    .cooing-speech {
        padding: 1rem;
        border-radius: 15px;
        font-size: 0.95rem;
        line-height: 1.5;
        max-width: 100%;
        word-wrap: break-word;
    }
    
    /* Indicators */
    .indicators-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .indicator-card-new {
        background: white;
        border-radius: 12px;
        padding: 1.25rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .indicator-card-new h5 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .indicator-values-new {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }
    
    .indicator-value-new {
        flex: 1;
        text-align: center;
        padding: 0.75rem;
        border-radius: 8px;
        background: rgba(248, 249, 250, 0.8);
    }
    
    .indicator-value-new .label {
        font-size: 0.8rem;
        font-weight: 500;
        margin-bottom: 0.5rem;
        color: #495057; /* Darker for better contrast */
    }
    
    .indicator-value-new .value {
        font-size: 0.95rem;
        font-weight: 600;
        color: #212529; /* Ensure high contrast */
    }
    
    .indicator-divider-new {
        width: 2px;
        height: 40px;
        background: #e9ecef;
        border-radius: 1px;
    }
    
    /* Tips Section */
    .tips-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin: 1.5rem 0;
    }
    
    .tip-item {
        padding: 1.25rem;
        border-radius: 12px;
        font-size: 0.9rem;
        line-height: 1.5;
        word-wrap: break-word;
    }
    
    .tip-item::before {
        font-size: 1.2rem;
        top: 0.75rem;
        right: 0.75rem;
    }
    
    /* Progress/Gauge Elements */
    .progress-container {
        margin: 1rem 0;
    }
    
    .progress-bar {
        height: 8px;
        border-radius: 4px;
        overflow: hidden;
    }
    
    .progress-fill {
        height: 100%;
        transition: width 0.8s ease;
        border-radius: 4px;
    }
    
    /* Loading States */
    .loading-spinner {
        text-align: center;
        padding: 2rem;
    }
    
    .loading-text {
        font-size: 1rem;
        margin-top: 1rem;
    }
    
    /* Error States */
    .alert-danger {
        border-radius: 12px;
        padding: 1rem;
        margin: 1rem 0;
        font-size: 0.9rem;
        word-wrap: break-word;
    }
    
    /* Navigation Mobile Styles */
    nav {
        padding: 1rem 0;
        margin-bottom: 1rem;
    }
    
    nav .btn {
        width: auto;
        min-width: 180px;
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        border-width: 2px;
        border-radius: 20px;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
    }
    
    nav .btn i {
        margin-right: 0.5rem;
        font-size: 1rem;
    }
    
    /* Feature Cards (for main page) */
    .feature-card {
        width: 100%;
        margin: 0 0 1rem;
        padding: 1.5rem;
        border-radius: 12px;
        text-align: center;
    }
    
    .feature-card:hover {
        transform: translateY(-5px);
    }
    
    .feature-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .feature-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }
    
    .feature-card p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}

@media (max-width: 576px) {
    /* Even more aggressive mobile constraints for small screens */
    .container, .container-fluid, .container-sm, .container-md, .container-lg, .container-xl {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .card-body {
        padding: 0.75rem !important;
    }
    
    .hero-section {
        padding: 1rem 0.5rem !important;
    }
    
    /* KakaoTalk Banner Small Mobile */
    .kakaotalk-banner {
        padding: 5px 8px !important;
        font-size: 0.85rem !important;
        border-radius: 6px !important;
        margin-top: 0.5rem !important;
        max-width: 280px !important;
    }
    
    /* Additional mobile-specific element constraints */
    .feature-grid, .feature-cards, .analysis-container {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Ensure Bootstrap utilities don't override our mobile layout */
    .py-5, .px-3, .mx-auto, .text-center {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .hero-section h1 {
        font-size: 1.6rem;
    }
    
    .hero-section p {
        font-size: 0.9rem;
    }
    
    .character-image {
        width: 50px;
        height: 50px;
    }
    
    .upload-area {
        padding: 1.5rem 0.75rem;
    }
    
    .upload-area h3 {
        font-size: 1.1rem;
    }
    
    .upload-area p {
        font-size: 0.85rem;
    }
    
    /* Additional mobile fixes for verdict section */
    .verdict-highlight {
        padding: 0.75rem !important;
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        word-break: keep-all !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
    }
    
    .verdict-highlight .fw-semibold {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        word-break: keep-all !important;
        overflow-wrap: break-word !important;
        display: block !important;
    }
    
    .d-flex.align-items-center {
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left !important;
    }
    
    .d-flex.align-items-center .display-4 {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .fs-6, .fs-md-5 {
        font-size: 0.8rem !important;
    }
    
    .card-header h6 {
        font-size: 0.9rem !important;
    }
    
    .btn-romantic {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .diagnosis-summary {
        padding: 1.25rem;
    }
    
    .diagnosis-text {
        font-size: 1.2rem;
    }
    
    .score-display {
        font-size: 1.8rem;
    }
    
    .cooing-character img {
        width: 70px;
        height: 70px;
    }
    
    .cooing-speech {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    .indicator-card-new {
        padding: 1rem;
    }
    
    .indicator-card-new h5 {
        font-size: 1rem;
    }
    
    .indicator-values-new {
        gap: 0.5rem;
    }
    
    .indicator-value-new {
        padding: 0.625rem;
    }
    
    .indicator-value-new .label {
        font-size: 0.75rem;
    }
    
    .indicator-value-new .value {
        font-size: 0.9rem;
    }
    
    .tip-item {
        padding: 1rem;
        font-size: 0.85rem;
    }
    
    .feature-card {
        padding: 1.25rem;
    }
    
    .feature-icon {
        font-size: 2rem;
    }
    
    .feature-card h3 {
        font-size: 1.1rem;
    }
    
    .feature-card p {
        font-size: 0.85rem;
    }
    
    /* Judge verdict section mobile fixes */
    .card-body {
        padding: 1rem;
    }
    
    .d-flex.align-items-center {
        align-items: flex-start !important;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .fs-6 {
        font-size: 0.8rem !important;
    }
    
    .fs-md-5 {
        font-size: 0.9rem !important;
    }
    
    /* Navigation Mobile Styles for Small Screens */
    nav .btn {
        min-width: 160px;
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    nav .btn i {
        margin-right: 0.4rem;
        font-size: 0.9rem;
    }
    
    /* Shared results responsive font sizes */
    .fs-7 {
        font-size: 0.75rem !important;
    }
    
    .fs-md-6 {
        font-size: 0.875rem !important;
    }
    
    .fs-md-5 {
        font-size: 1rem !important;
    }
    
    /* Better badge sizing for mobile */
    .badge {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.5rem !important;
    }
    
    /* Better text wrapping for mobile */
    .flex-grow-1 {
        min-width: 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Fix for verdict text truncation */
    .verdict-highlight {
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        line-height: 1.5;
    }
    
    .verdict-highlight .fw-semibold {
        font-size: 0.9rem;
        line-height: 1.4;
        word-break: keep-all;
        overflow-wrap: break-word;
    }
}

/* Chat Modal Styles */
.chat-messages {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    background: var(--bg-light);
}

.chat-message {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    max-width: 80%;
    word-wrap: break-word;
}

.chat-message.user {
    background: var(--primary-color);
    color: white;
    margin-left: auto;
    text-align: right;
}

.chat-message.ai {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    margin-right: auto;
}

.chat-message.ai::before {
    content: '🤖 BASE AI: ';
    font-weight: 600;
    color: var(--primary-color);
}

.chat-typing {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-right: auto;
    max-width: 80%;
}

.chat-typing::before {
    content: '🤖 BASE AI: ';
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.typing-indicator {
    display: flex;
    align-items: center;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    border-radius: 50%;
    background: var(--secondary-color);
    margin: 0 2px;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Desktop responsive font sizes */
@media (min-width: 769px) {
    .fs-md-6 {
        font-size: 1rem !important;
    }
    
    .fs-md-5 {
        font-size: 1.25rem !important;
    }
}

/* Animations for page load */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Feature Cards */
.feature-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon i {
    transform: scale(1.1);
}

.feature-tags .badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
}

.bg-pink-soft {
    background-color: rgba(0, 123, 255, 0.1);
    color: var(--primary-color);
}

.bg-green-soft {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.bg-warning-soft {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

/* Success Rate Styles (Confession Page) */
.success-rate-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 8px solid #28a745;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    background: rgba(40, 167, 69, 0.1);
}

/* Confession Gauge Styles */
.confession-gauge {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.confession-gauge .gauge-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 8px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.confession-gauge .gauge-circle.success-high {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.confession-gauge .gauge-circle.success-medium-high {
    border-color: #20c997;
    background: rgba(32, 201, 151, 0.1);
}

.confession-gauge .gauge-circle.success-medium {
    border-color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.confession-gauge .gauge-circle.success-medium-low {
    border-color: #fd7e14;
    background: rgba(253, 126, 20, 0.1);
}

.confession-gauge .gauge-circle.success-low {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.confession-gauge .gauge-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
}

.confession-gauge .rate-number {
    font-size: 1.5rem;
    color: #212529; /* Darker text for better contrast */
    font-weight: 600;
}

.confidence-badge {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.confidence-badge.높음 {
    background-color: #3b82f6 !important; /* Blue background */
    color: #ffffff !important; /* White text */
}

.confidence-badge.보통 {
    background-color: #e5e7eb !important; /* Light gray background */
    color: #000000 !important; /* Black text */
}

.confidence-badge.낮음 {
    background-color: #f87171 !important; /* Light red background */
    color: #ffffff !important; /* White text */
}

/* Additional badge classes for consistency */
.badge-high {
    background-color: #3b82f6 !important; /* Blue background */
    color: #ffffff !important; /* White text */
}

.badge-normal {
    background-color: #e5e7eb !important; /* Light gray background */
    color: #000000 !important; /* Black text */
}

.badge-low {
    background-color: #f87171 !important; /* Light red background */
    color: #ffffff !important; /* White text */
}

.factors-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.positive-factors {
    border-left: 4px solid #28a745;
}

/* New Character-Driven Result Cards */
.result-season-card {
    background: linear-gradient(135deg, rgba(90, 155, 255, 0.1), rgba(255, 255, 255, 0.9));
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
}

.result-season-card h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.result-season-card .season-emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* BASE AI Speech Bubble */
.ai-speech-bubble {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: var(--card-shadow);
    position: relative;
    border-left: 4px solid var(--primary-color);
}

.ai-speech-bubble::before {
    content: '';
    position: absolute;
    top: 20px;
    left: -10px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid var(--primary-color);
}

.ai-speech-bubble .speaker-info {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.ai-speech-bubble .speaker-info .ai-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.ai-speech-bubble .speaker-name {
    font-weight: 600;
    color: var(--primary-color);
}

.ai-speech-bubble .message {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Score Gauge */
.score-gauge {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin: 1.5rem 0;
    box-shadow: var(--card-shadow);
    text-align: center;
}

.score-display {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.score-total {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.score-bar {
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #4A90E2);
    transition: width 1s ease;
}

/* New Indicator Cards */
.indicator-cards-new {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.indicator-card-new {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.indicator-card-new:hover {
    transform: translateY(-3px);
}

.indicator-card-new h5 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.indicator-values-new {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.indicator-value-new {
    text-align: center;
    flex: 1;
}

.indicator-value-new .label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.indicator-value-new .value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.indicator-divider-new {
    width: 1px;
    height: 30px;
    background: #e9ecef;
    margin: 0 1rem;
}

/* Tips Carousel */
.tips-carousel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    scroll-snap-type: x mandatory;
}

.tip-card-new {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    min-width: 280px;
    box-shadow: var(--card-shadow);
    scroll-snap-align: start;
    flex-shrink: 0;
    border-left: 4px solid var(--primary-color);
}

.tip-card-new .tip-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.tip-card-new .tip-header img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
}

.tip-card-new .tip-header .tip-title {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.tip-card-new .tip-content {
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Footer Actions */
.footer-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.footer-actions .btn {
    border-radius: 15px;
    padding: 12px 24px;
    font-weight: 500;
}

.btn-share {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
}

.btn-reset {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: none;
}

/* Character Image */
.cooing-character {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    animation: float 3s ease-in-out infinite;
}

.cooing-character-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.risk-factors {
    border-left: 4px solid #ffc107;
}

.factors-list .factor-item {
    background: rgba(248, 249, 250, 0.8);
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-left: 3px solid #28a745;
}

.risk-factors .factor-item {
    border-left-color: #ffc107;
}

.timing-card, .backup-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    height: 100%;
}

/* Judge Page Styles */
.verdict-summary .judgment-result {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.judgment-result.유죄 {
    background-color: #dc3545;
}

.judgment-result.무죄 {
    background-color: #28a745;
}

.judgment-result.양쪽\ 모두\ 잘못 {
    background-color: #ffc107;
    color: #000;
}

.judgment-result.상황\ 문제 {
    background-color: #6c757d;
}

.responsibility-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
}

.responsibility-bar {
    width: 100%;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.bar-fill {
    height: 100%;
    transition: width 0.8s ease;
    border-radius: 10px;
}

.person-a-bar {
    background: linear-gradient(90deg, #007bff, #66b3ff);
}

.person-b-bar {
    background: linear-gradient(90deg, #6c5ce7, #a8a8ff);
}

.percentage {
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
    margin-top: 0.5rem;
}

.evidence-container .evidence-item {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #17a2b8;
}

.evidence-item .evidence-text {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.evidence-item .interpretation-text {
    color: #6c757d;
    font-style: italic;
}

.actions-container .action-item {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #ffc107;
}

.outlook-card, .advice-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.outlook-card {
    border-left: 4px solid #17a2b8;
}

.advice-card {
    border-left: 4px solid #dc3545;
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-romantic);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-romantic {
    box-shadow: var(--shadow-soft);
}

.rounded-romantic {
    border-radius: 20px;
}

/* Upload Area Styles */
.upload-area {
    border: 3px dashed #007bff;
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.05), rgba(102, 179, 255, 0.05));
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #0056b3;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1), rgba(102, 179, 255, 0.1));
    transform: translateY(-2px);
}

/* Click ripple effect */
.upload-area::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 123, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

.upload-area.clicked::before {
    width: 200px;
    height: 200px;
    transition: width 0.4s ease, height 0.4s ease;
}

.upload-area.clicked {
    animation: clickPulse 0.3s ease;
}

@keyframes clickPulse {
    0% { transform: translateY(-2px) scale(1); }
    50% { transform: translateY(-2px) scale(0.98); }
    100% { transform: translateY(-2px) scale(1); }
}

/* Ensure content stays above ripple */
.upload-area > * {
    position: relative;
    z-index: 2;
}

.upload-icon {
    font-size: 4rem;
    color: #007bff;
    margin-bottom: 1rem;
}

/* File Preview Styles */
.extracted-text-container,
.transcribed-text-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    border-left: 4px solid #007bff;
}

.extracted-text,
.transcribed-text {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}

/* Indicator Cards */
.indicator-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    height: 100%;
}

.indicator-title {
    color: #007bff;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center;
}

.indicator-item {
    margin-bottom: 1rem;
}

/* Multiple File Upload Styles */
.selected-files-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    background-color: #f8f9fa;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 5px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    font-size: 0.9em;
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

.file-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.file-remove:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

.indicator-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
}

.indicator-value {
    font-weight: bold;
    color: #007bff;
}

/* Progress Bar Custom Colors */
.progress {
    height: 8px;
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* Verdict Styles */
.verdict-card {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    border: 3px solid #e9ecef;
    margin-bottom: 2rem;
}

.verdict-guilty-1 {
    border-color: #dc3545;
    background: linear-gradient(135deg, #fff5f5, #ffe6e6);
}

.verdict-guilty-2 {
    border-color: #fd7e14;
    background: linear-gradient(135deg, #fff8f5, #fff0e6);
}

.verdict-both {
    border-color: #6f42c1;
    background: linear-gradient(135deg, #f8f5ff, #f0e6ff);
}

.verdict-no-fault {
    border-color: #198754;
    background: linear-gradient(135deg, #f5fff8, #e6ffe6);
}

.verdict-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.verdict-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #212529; /* High contrast black */
}

.verdict-summary {
    font-size: 1.1rem;
    color: #495057; /* Darker for better contrast */
    margin: 0;
}

/* Responsibility Chart */
.responsibility-chart {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
}

.responsibility-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.responsibility-label {
    width: 100px;
    font-weight: 500;
    color: #212529; /* High contrast black */
}

.responsibility-bar {
    flex: 1;
    height: 25px;
    background: #e9ecef;
    border-radius: 15px;
    margin: 0 1rem;
    overflow: hidden;
}

.responsibility-fill {
    height: 100%;
    border-radius: 15px;
    transition: width 0.8s ease;
}

.responsibility-fill.person1 {
    background: linear-gradient(90deg, #dc3545, #e74c3c);
}

.responsibility-fill.person2 {
    background: linear-gradient(90deg, #fd7e14, #f39c12);
}

.responsibility-value {
    width: 50px;
    text-align: right;
    font-weight: bold;
    color: #495057;
}

/* Evidence and Action Items */
.evidence-item,
.action-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #007bff;
}

.evidence-number,
.action-number {
    width: 30px;
    height: 30px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
}

.evidence-content,
.action-content {
    flex: 1;
    color: #495057;
    line-height: 1.6;
}

/* Reasoning Content */
.reasoning-content {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    border-left: 4px solid #17a2b8;
}

.reasoning-content p {
    margin: 0;
    line-height: 1.6;
    color: #495057;
}

/* Outlook Card */
.outlook-card {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: 15px;
    padding: 1.5rem;
    border: 2px solid #e9ecef;
}

.outlook-positive {
    border-color: #198754;
    background: linear-gradient(135deg, #f5fff8, #e6ffe6);
}

.outlook-neutral {
    border-color: #6c757d;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.outlook-concerning {
    border-color: #dc3545;
    background: linear-gradient(135deg, #fff5f5, #ffe6e6);
}

.outlook-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.outlook-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.outlook-title {
    font-weight: bold;
    margin: 0;
    color: #495057;
}

.outlook-advice {
    color: #6c757d;
    line-height: 1.6;
}

/* Additional Button Colors */
.btn-purple {
    background: linear-gradient(135deg, #6f42c1, #9c88ff);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-purple:hover {
    background: linear-gradient(135deg, #5a359a, #8b7bd8);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(111, 66, 193, 0.3);
}

.text-purple {
    color: #6f42c1 !important;
}

/* Badge Colors */
.bg-info-soft {
    background-color: rgba(13, 202, 240, 0.1) !important;
    color: #0dcaf0 !important;
}

.bg-purple-soft {
    background-color: rgba(111, 66, 193, 0.1) !important;
    color: #6f42c1 !important;
}

/* Drag and Drop Styles */
.upload-area.drag-over {
    border-color: #0056b3;
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.15), rgba(255, 105, 135, 0.15));
}

/* Loading Animation */
.loading-spinner {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Enhanced Results Display Styles */
.summary-highlight {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #007bff;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

.reasoning-highlight {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #28a745;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

.judgment-highlight {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #ffc107;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

/* Affection Analysis Gauge */
.affection-gauge {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.gauge-circle {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #ff6b6b 0deg,
        #feca57 120deg,
        #48cab2 240deg,
        #ff6b6b 360deg
    );
    padding: 8px;
}

.gauge-fill {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gauge-text {
    text-align: center;
    font-weight: bold;
    color: #212529; /* High contrast black */
}

.score-number {
    font-size: 1.5em;
    display: block;
}

/* Confession Success Rate Display */
.rate-circle {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin-bottom: 15px;
}

.rate-circle.success-high {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}

.rate-circle.success-medium-high {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
}

.rate-circle.success-medium {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.rate-circle.success-medium-low {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
}

.rate-circle.success-low {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
}

.rate-percentage {
    font-size: 1.5em;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.rate-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 1.2em;
}

/* Confidence Bar */
.confidence-bar-container {
    position: relative;
    width: 100%;
    margin: 20px 0;
}

.confidence-bar {
    width: 100%;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    border-radius: 10px;
    transition: width 0.8s ease;
}

.confidence-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: #212529; /* High contrast black */
    font-size: 0.9em;
}

/* Judge Verdict Display */
.verdict-icon-large {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.verdict-badge-container {
    margin-top: 20px;
}

/* Mobile responsive for enhanced styles */
@media (max-width: 768px) {
    .rate-circle, .affection-gauge, .verdict-icon-large {
        width: 100px;
        height: 100px;
    }
    
    .rate-percentage, .score-number {
        font-size: 1.2em;
    }
    
    .summary-highlight, .reasoning-highlight, .judgment-highlight {
        padding: 12px;
        margin: 8px 0;
    }
}
