:root {
    --primary-color: #6c5ce7;
    --primary-hover: #5b4cc4;
    --secondary-color: #a29bfe;
    --text-dark: #2d3436;
    --text-muted: #636e72;
    --bg-white: #ffffff;
    --bg-gray: #f9f9f9;
    --card-shadow: 0 8px 24px rgba(108, 92, 231, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    word-break: keep-all;
    overflow-x: hidden;
}

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

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 10px rgba(0,0,0,0.05);
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 15px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 700;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 60px;
    background: radial-gradient(circle at top right, #f8f9ff 0%, #ffffff 100%);
}

.hero-content {
    width: 100%;
    max-width: 500px;
}

.hero-content h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    color: var(--primary-color);
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Upload Area */
.upload-container {
    background: white;
    padding: 24px;
    border-radius: 24px;
    box-shadow: var(--card-shadow);
}

.upload-area {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 2px dashed #dcdde1;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    background: #fcfcff;
}

.upload-area:active {
    transform: scale(0.98);
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

#preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: #f1f2f6;
    color: var(--text-dark);
    border: none;
    padding: 14px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    margin-top: 10px;
}

.w-100 { width: 100%; }

/* Loading Spinner */
.spinner-container {
    margin-top: 20px;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

/* Results */
#result-container {
    margin-top: 25px;
    text-align: left;
}

#result-message {
    text-align: center;
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.bar-container {
    height: 12px;
    background: #eee;
    border-radius: 6px;
    margin: 6px 0 16px;
    overflow: hidden;
}

.bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 6px;
}

.label-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 700;
}

/* Sections */
.category-section {
    padding: 60px 0;
}

.dark-bg { background: var(--bg-gray); }

.section-title {
    font-size: 1.6rem;
    margin-bottom: 30px;
    text-align: center;
}

.form-container {
    background: white;
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
}

footer {
    padding: 30px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-gray);
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .hero-content h1 { font-size: 1.8rem; }
    .upload-container { padding: 16px; }
    .nav-links { gap: 10px; }
}
