@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap");

:root {
  --main-color: #3498db;
  --secondary-color: #2ecc71;
  --background-color: #f8f9fa;
  --text-color: #2c3e50;
  --container-bg: #fff;
  --border-radius: 12px;
  --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --transition-speed: 0.3s;
  --white-color: #fff;
  --nav-bg: #fff;
}

[data-theme="dark"] {
  --background-color: #121212;
  --text-color: #e0e0e0;
  --container-bg: #1e1e1e;
  --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --nav-bg: #1e1e1e;
}

* {
  box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
  font-family: "Poppins", "Noto Sans KR", sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  transition: background-color var(--transition-speed), color var(--transition-speed);
  line-height: 1.6;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--nav-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--main-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--main-color);
}

#theme-btn {
  background: none;
  border: 1px solid var(--main-color);
  color: var(--main-color);
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all var(--transition-speed);
}

#theme-btn:hover {
  background-color: var(--main-color);
  color: white;
}

/* Main Container */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

.card {
    background-color: var(--container-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 60px;
}

h1 {
  color: var(--main-color);
  margin-bottom: 10px;
  font-size: 3rem;
  font-weight: 600;
}

.subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 40px;
}

/* Classifier */
.classifier-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.upload-section {
    width: 100%;
}

.file-input {
    display: none;
}

.file-label {
    background-color: var(--main-color);
    color: var(--white-color);
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    display: inline-block;
}

.file-label:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.6);
}

#image-preview {
    max-width: 100%;
    max-height: 400px;
    border-radius: 15px;
    border: 5px solid var(--main-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Prediction Bars */
#label-container {
    width: 100%;
    max-width: 500px;
}

.prediction-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    margin-bottom: 10px;
    background-color: rgba(52, 152, 219, 0.05);
    border-radius: 10px;
}

.class-label {
    font-weight: 600;
    min-width: 80px;
}

.progress-container {
    flex-grow: 1;
    height: 14px;
    background-color: #e0e0e0;
    border-radius: 7px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--main-color);
    transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.probability-label {
    font-weight: 600;
    min-width: 50px;
    text-align: right;
}

/* Sections */
.content-section {
    margin-bottom: 60px;
    text-align: left;
}

.grid-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Section Titles */
.section-title {
    font-size: 1.8rem;
    color: var(--main-color);
    margin-bottom: 30px;
    text-align: center;
}

/* Feature & Info Lists */
.feature-list,
.info-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
}

.feature-list li,
.info-list li {
    padding: 8px 0 8px 24px;
    position: relative;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.feature-list li:last-child,
.info-list li:last-child {
    border-bottom: none;
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: 700;
}

.info-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--main-color);
}

/* Two Column Grid */
.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 16px;
}

.two-col-grid h4 {
    margin: 0 0 12px;
    color: var(--main-color);
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.faq-item {
    margin-bottom: 16px;
}

.faq-question {
    font-size: 1rem;
    margin: 0 0 10px;
    color: var(--main-color);
}

.faq-answer {
    margin: 0;
    color: var(--text-color);
    line-height: 1.7;
}

/* Contact Form */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: var(--white-color);
  color: var(--text-color);
  font-family: inherit;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background-color: #333;
    border-color: #444;
}

.submit-btn {
  width: 100%;
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 15px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  background-color: #27ae60;
  transform: translateY(-2px);
}

/* Footer */
.footer {
    background-color: var(--nav-bg);
    padding: 40px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.footer-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--main-color);
}

/* Responsive */
@media (max-width: 768px) {
    .grid-section {
        grid-template-columns: 1fr;
    }

    .two-col-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.2rem;
    }

    .nav-links a:not(:last-of-type) {
        display: none;
    }

    .section-title {
        font-size: 1.4rem;
    }
}
