:root {
    --bg-color: #eef6ff;
    --header-bg: #3a9cff;
    --header-text: white;
    --card-bg: white;
    --card-text: #333;
    --price-color: #3a9cff;
    --button-bg: #3a9cff;
    --button-hover: #2a7dd3;
    --footer-bg: #dcecff;
    --footer-text: #555;
    --shadow: 0 4px 12px rgba(0,0,0,0.1);
    --border-color: #ddd;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --header-bg: #1f1f1f;
    --header-text: #e0e0e0;
    --card-bg: #1e1e1e;
    --card-text: #e0e0e0;
    --price-color: #bb86fc;
    --button-bg: #bb86fc;
    --button-hover: #9965f4;
    --footer-bg: #1a1a1a;
    --footer-text: #aaa;
    --shadow: 0 4px 12px rgba(0,0,0,0.5);
    --border-color: #444;
}

body {
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    background: var(--bg-color);
    color: var(--card-text);
    margin: 0;
    transition: background 0.3s, color 0.3s;
    line-height: 1.6;
}

header {
    background: var(--header-bg);
    color: var(--header-text);
    text-align: center;
    padding: 40px;
    position: relative;
}

header h1 {
    margin-bottom: 10px;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
}

/* Navigation Styles */
.main-nav {
    background: var(--card-bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 15px 0;
    margin: 0;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--card-text);
    font-weight: bold;
    transition: color 0.2s;
}

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

.container {
    max-width: 900px;
    margin: auto;
    padding: 40px 20px;
}

/* Content Sections */
.content-section {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.content-section h2 {
    color: var(--price-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.brand-info {
    margin-bottom: 25px;
    padding: 15px;
    background: var(--bg-color);
    border-radius: 8px;
    border-left: 5px solid var(--price-color);
}

.brand-info h3 {
    margin-top: 0;
}

.product {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: background 0.3s, box-shadow 0.3s;
    margin-bottom: 40px;
}

/* AI Camera Styles */
#webcam-container canvas {
    border-radius: 10px;
    width: 100%;
    max-width: 320px;
    height: auto;
    box-shadow: var(--shadow);
    margin: 10px 0;
}

.result-bar {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    height: 35px;
}

.result-bar div {
    height: 100%;
    background: var(--price-color);
    transition: width 0.2s;
}

.result-bar span {
    position: absolute;
    width: 100%;
    text-align: center;
    color: #333;
    font-weight: bold;
    font-size: 15px;
    line-height: 35px;
}

[data-theme="dark"] .result-bar {
    background: #333;
}

[data-theme="dark"] .result-bar span {
    color: #eee;
}

.price {
    font-size: 24px;
    color: var(--price-color);
    margin: 15px 0;
    font-weight: bold;
}

button {
    background: var(--button-bg);
    color: white;
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: bold;
}

button:hover {
    background: var(--button-hover);
}

.store-list {
    display: none;
    margin-top: 30px;
}

.store {
    background: var(--card-bg);
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.store a {
    text-decoration: none;
    color: var(--price-color);
    font-weight: bold;
}

.contact-form {
    margin-top: 50px;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: left;
}

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

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

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--card-text);
    box-sizing: border-box;
}

footer {
    margin-top: 50px;
    text-align: center;
    padding: 30px 20px;
    background: var(--footer-bg);
    color: var(--footer-text);
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--footer-text);
    text-decoration: none;
    margin: 0 10px;
}

.footer-links a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .nav-links {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
}
