:root {
    --primary-color: #ff6b6b; /* Soft Red/Pink */
    --secondary-color: #2d3436; /* Dark Grey */
    --accent-color: #fd79a8; /* Pink */
    --bg-color: #fff5f5;
    --card-bg: #ffffff;
    --text-color: #2d3436;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    --header-bg: #ffffff;
    --border-color: #ffebeb;
}

body.dark-mode {
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --text-color: #f5f5f5;
    --secondary-color: #dfe6e9;
    --header-bg: #1a1a1a;
    --border-color: #333333;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Serif KR', serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

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

header {
    background-color: var(--header-bg);
    color: var(--primary-color);
    padding: 80px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s, border-color 0.3s;
}

header h1 {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: -1px;
}

header p {
    color: #a29bfe;
    font-weight: 700;
    margin-top: 10px;
}

.card {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.test-section {
    margin-top: -60px;
}

.icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
    background-color: #ff5252;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border: 1px solid var(--border-color);
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 400;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 30px;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.dark-mode .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.hidden {
    display: none;
}

.webcam-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.video-wrapper {
    position: relative;
    width: 250px;
    height: 250px;
    background-color: #f0f0f0;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 30px;
    border: 5px solid var(--card-bg);
    box-shadow: 0 0 0 5px var(--bg-color), 0 0 0 6px var(--border-color);
    transition: border-color 0.3s;
}

.result-list {
    width: 100%;
    margin-bottom: 20px;
}

.result-bar-container {
    margin-bottom: 20px;
    text-align: left;
}

.label-text {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.bar-bg {
    background-color: var(--border-color);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    transition: width 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.result-message {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-top: 10px;
    padding: 20px;
    background-color: rgba(255, 107, 107, 0.05);
    border-radius: 15px;
    width: 100%;
}

.info-section h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 900;
}

.info-section ul {
    text-align: left;
    list-style: none;
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.9rem;
}

.info-section li {
    margin-bottom: 10px;
}

.info-section li::before {
    content: "♥ ";
    color: var(--accent-color);
}

footer {
    padding: 60px 0;
    font-size: 0.8rem;
    color: #b2bec3;
}

/* Theme Toggle Button */
.theme-toggle-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-toggle-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2.2rem;
    }
}
