/* style.css */
:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --background-color: #f7f9fc;
    --card-background: #ffffff;
    --text-color: #2d3436;
    --accent-bg: #f1f2f6;
    --shadow-color: rgba(0, 0, 0, 0.08);
}

[data-theme='dark'] {
    --background-color: #1e272e;
    --card-background: #2f3542;
    --text-color: #f1f2f6;
    --accent-bg: #3e4451;
    --shadow-color: rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Noto Sans KR', 'Poppins', sans-serif;
    background-color: var(--background-color);
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"%3E%3Cfilter id="noise"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noise)" opacity="0.03"/%3E%3C/svg%3E');
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 3rem 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.top-bar {
    width: 90%;
    max-width: 500px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.lang-switch { font-size: 0.9rem; font-weight: 600; }
.lang-switch a { text-decoration: none; color: var(--text-color); opacity: 0.5; }
.lang-switch a.active { opacity: 1; color: var(--primary-color); }

.container {
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

#theme-btn {
    background: var(--card-background);
    color: var(--text-color);
    border: 1px solid var(--accent-bg);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
}

.card {
    background-color: var(--card-background);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 15px 35px var(--shadow-color);
    width: 90%;
    max-width: 500px;
}

.info-section { text-align: left; }
.info-section h2 { margin-bottom: 1.5rem; font-size: 1.5rem; }
.info-section h3 { margin-top: 1.5rem; font-size: 1.1rem; }
.info-section p { line-height: 1.6; opacity: 0.9; font-size: 0.95rem; }

h1 { margin-bottom: 0.5rem; font-size: 1.8rem; }
.subtitle { margin-bottom: 2rem; opacity: 0.7; }

.test-area {
    background-color: var(--accent-bg);
    border-radius: 18px;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    margin-bottom: 2rem;
}

#webcam-container canvas, #image-preview { width: 100% !important; height: 100% !important; object-fit: cover; }

.btn-group { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2rem; }
.btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff; border: none; padding: 1rem; border-radius: 12px; cursor: pointer; font-weight: 600; transition: all 0.3s;
}
.outline-btn { background: transparent; color: var(--primary-color); border: 2px solid var(--primary-color); }
.secondary-btn { background: var(--accent-bg); color: var(--text-color); margin-top: 1rem; }
.btn:hover { transform: translateY(-3px); opacity: 0.9; }

#result-container { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--accent-bg); }
.prediction-bar-container { margin-bottom: 1.2rem; text-align: left; }
.prediction-label { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-weight: 600; }
.bar-bg { background: var(--accent-bg); height: 12px; border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary-color); width: 0; transition: width 0.5s ease-out; }
.result-text { margin-top: 1.5rem; padding: 1rem; background: var(--accent-bg); border-radius: 12px; line-height: 1.6; font-size: 0.95rem; text-align: left; }

.contact-card { text-align: left; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group input, .form-group textarea { padding: 0.8rem; border-radius: 10px; border: 1px solid var(--accent-bg); background: var(--background-color); color: var(--text-color); }

.site-footer { margin-top: 4rem; padding: 2rem; width: 90%; max-width: 500px; text-align: center; border-top: 1px solid var(--accent-bg); font-size: 0.85rem; opacity: 0.7; }
.footer-links { margin-top: 0.5rem; }
.footer-links a { color: var(--text-color); text-decoration: none; margin: 0 0.5rem; }
