
:root {
    --background-color: #121212;
    --card-background-color: #1E1E1E;
    --text-color: #E0E0E0;
    --title-color: #FFFFFF;
    --subtitle-color: #B0B0B0;
    --grid-color: rgba(255, 255, 255, 0.1);
    --bitcoin-color: #F7931A;
    --gold-color: #FFD700;
    --sp500-color: #42a5f5;
    --font-family: 'Poppins', sans-serif;
    --toggle-bg: #333;
}

body.light-mode {
    --background-color: #f5f5f5;
    --card-background-color: #ffffff;
    --text-color: #333333;
    --title-color: #121212;
    --subtitle-color: #666666;
    --grid-color: rgba(0, 0, 0, 0.1);
    --toggle-bg: #ddd;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    text-align: center;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"%3E%3Cfilter id="n"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.7" numOctaves="10" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23n)" opacity="0.03"/%3E%3C/svg%3E');
    transition: background-color 0.3s ease, color 0.3s ease;
}

#theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background-color: var(--toggle-bg);
    color: var(--text-color);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-family);
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, background-color 0.3s ease;
    z-index: 1000;
}

#theme-toggle:hover {
    transform: scale(1.05);
}

header h1 {
    font-size: 3em;
    font-weight: 700;
    color: var(--title-color);
    margin-bottom: 10px;
}

header p {
    font-size: 1.2em;
    font-weight: 400;
    color: var(--subtitle-color);
    margin-top: 0;
}

.chart-container {
    width: 90%;
    max-width: 1000px;
    height: 600px; /* 고정 높이 추가 */
    margin: 50px auto;
    padding: 30px;
    background-color: var(--card-background-color);
    border-radius: 20px;
    box-shadow: 
        0px 5px 15px rgba(0, 0, 0, 0.2),
        0px 15px 35px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chart-container:hover {
    transform: translateY(-5px);
    box-shadow: 
        0px 8px 20px rgba(0, 0, 0, 0.25),
        0px 20px 45px rgba(0, 0, 0, 0.35);
}

.contact-form-container,
.comments-container,
.animal-test-container,
.content-text-section {
    width: 90%;
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background-color: var(--card-background-color);
    border-radius: 20px;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.2);
    text-align: left;
    transition: background-color 0.3s ease;
}

.contact-form-container h2,
.comments-container h2,
.animal-test-container h2,
.content-text-section h2,
.content-text-section h3 {
    color: var(--title-color);
    margin-top: 0;
}

.main-nav {
    margin-bottom: 20px;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

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

.insight-list {
    padding-left: 20px;
}

.insight-list li {
    margin-bottom: 10px;
}

.site-footer {
    margin-top: 60px;
    padding: 40px 20px;
    background-color: var(--card-background-color);
    color: var(--subtitle-color);
    font-size: 0.9em;
}

.footer-nav a {
    color: var(--subtitle-color);
    text-decoration: none;
    margin: 0 5px;
}

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

#test-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#webcam-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    background: #000;
    line-height: 0;
}

#label-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.prediction-bar-container {
    width: 100%;
    background-color: var(--background-color);
    border-radius: 10px;
    height: 30px;
    position: relative;
    overflow: hidden;
}

.prediction-bar {
    height: 100%;
    background-color: var(--bitcoin-color);
    width: 0%;
    transition: width 0.2s ease;
}

.prediction-text {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    font-weight: 600;
    font-size: 0.9em;
    color: var(--text-color);
    z-index: 1;
}

.contact-form-container p {
    color: var(--subtitle-color);
    margin-bottom: 20px;
}

.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: 12px;
    border-radius: 10px;
    border: 1px solid var(--grid-color);
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-family);
    box-sizing: border-box;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--bitcoin-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.3s ease;
}

.submit-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}


@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .chart-container {
        width: 95%;
        padding: 20px;
    }
}
