
:root {
    --background-color: #121212;
    --text-color: #ffffff;
    --card-background: #1e1e1e;
    --accent-color: #03dac6;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --nav-height: 70px;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
    line-height: 1.6;
}

/* Navigation Styles */
header {
    background-color: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Hero Section */
.hero {
    padding: 4rem 2rem 2rem;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.2rem;
    color: #aaa;
    margin-bottom: 3rem;
}

.hero h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #eee;
}

/* Accident Types Grid */
.accident-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background-color: var(--card-background);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    box-shadow: 0 10px 20px var(--shadow-color);
    border: 1px solid #333;
    text-align: center;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(3, 218, 198, 0.2);
    border-color: var(--accent-color);
}

.card-icon span {
    font-size: 4rem;
    display: block;
    margin-bottom: 1.5rem;
}

.card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.card p {
    font-size: 0.95rem;
    color: #888;
    margin: 0;
}

/* Guide Section (SEO Optimized) */
.guide-section {
    padding: 5rem 2rem;
    background-color: #1a1a1a;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
}

.guide-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
}

.guide-container h2 {
    font-size: 2.2rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--accent-color);
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.guide-item h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-item h3::before {
    content: "•";
    color: var(--accent-color);
}

.guide-item p {
    font-size: 1rem;
    color: #aaa;
    line-height: 1.7;
}

/* Sub-page Specific Layout (Privacy/About) */
.sub-page {
    text-align: left;
}

.content-container {
    max-width: 800px;
    margin: 4rem auto 8rem;
    padding: 0 2rem;
}

.content-container h1 {
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    color: var(--accent-color);
    border-bottom: 2px solid #333;
    padding-bottom: 1rem;
}

.content-container h2 {
    font-size: 1.6rem;
    margin: 2.5rem 0 1rem;
    color: #fff;
}

.content-container p, .content-container li {
    font-size: 1.05rem;
    color: #ccc;
    margin-bottom: 1.2rem;
}

.content-container ul {
    padding-left: 1.5rem;
    margin-bottom: 2rem;
}

/* Overlay & Modal Styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.overlay.hidden {
    display: none;
}

.modal {
    background-color: #252525;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
    position: relative;
    display: flex;
    flex-direction: column;
}

/* (Existing modal/compact-btn styles below remain mostly the same, but with slight tweaks for dark theme consistency) */
/* ... */

.modal {
    background-color: #252525;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    position: relative;
    transform: translateY(0);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #333;
    padding-bottom: 1rem;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--accent-color);
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.modal-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    overflow-y: auto;
    padding-right: 0.5rem; /* Space for scrollbar */
}

/* Custom Scrollbar for Modal Content */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

.option-btn {
    background-color: #333;
    color: #fff;
    border: 2px solid transparent;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.option-btn:hover {
    background-color: #444;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

.ratio-box {
    background-color: #333;
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
    margin: 1rem 0;
}

.ratio-box p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.result-description h3 {
    margin-top: 1.5rem;
    font-size: 1.2rem;
    color: var(--accent-color);
}

.result-description ul {
    padding-left: 1.2rem;
    margin-top: 0.5rem;
}

.result-description li {
    margin-bottom: 0.5rem;
    color: #ccc;
}

/* Video Attribution Styles */
.video-attribution {
    text-align: left;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.video-attribution p {
    font-size: 0.75rem;
    color: #888;
    margin: 0.2rem 0;
    line-height: 1.4;
}

.video-attribution a {
    color: #aaa;
    text-decoration: underline;
}

.video-attribution a:hover {
    color: var(--accent-color);
}

/* Compact Info Buttons Styles */
.compact-info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.compact-btn {
    padding: 1rem 0.5rem;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 12px;
    color: #eee;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.compact-btn:hover {
    border-color: var(--accent-color);
    background-color: #333;
    transform: translateY(-2px);
}

.compact-btn.active {
    background-color: rgba(3, 218, 198, 0.15);
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 15px rgba(3, 218, 198, 0.2);
}

.compact-info-box {
    background-color: #222;
    border-radius: 16px;
    padding: 1.2rem;
    height: 520px; /* Fixed height to keep layout stable */
    overflow-y: auto; /* Enable vertical scrolling */
    border-left: 6px solid var(--accent-color);
    text-align: left;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
    margin-bottom: 1.5rem;
    display: block;
    clear: both;
}

/* Custom Scrollbar for Info Box */
.compact-info-box::-webkit-scrollbar {
    width: 5px;
}

.compact-info-box::-webkit-scrollbar-track {
    background: transparent;
}

.compact-info-box::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
}

.compact-info-box::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

.info-placeholder {
    color: #888;
    font-size: 0.9rem;
    margin: 0;
    text-align: center;
    line-height: 460px;
}

.ratio-detail-section {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    text-align: left;
    padding-bottom: 0.5rem; /* 하단 여백 확보 */
}

.detail-item h4 {
    margin: 0 0 0.3rem 0;
    color: var(--accent-color);
    font-size: 0.95rem;
}

.detail-text {
    margin: 0;
    font-size: 0.85rem;
    color: #ccc;
    line-height: 1.4;
}

.base-ratio-display {
    display: flex;
    gap: 1.5rem;
    font-size: 1rem;
    font-weight: bold;
}

.detail-item.highlighted {
    padding: 0.7rem 1rem;
    background-color: #2a2a2a;
    border-radius: 12px;
    border: 1px solid #333;
}

.mini-ratio-box {
    background-color: #333;
    padding: 0.8rem;
    border-radius: 10px;
    text-align: center;
    border: 2px solid var(--accent-color);
}

.mini-ratio-box p {
    margin: 0;
    font-size: 1.6rem;
    color: var(--accent-color);
    font-weight: 800;
}

/* Factor Selection Styles - Readable & Compact */
.factor-selection {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid #333;
}

.factor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

@media (max-width: 480px) {
    .factor-grid {
        grid-template-columns: 1fr;
    }
}

.factor-selection h4 {
    font-size: 0.85rem; /* 제목 크기 복구 */
    color: var(--accent-color);
    margin-bottom: 0.6rem;
}

.factor-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.4rem;
    cursor: pointer;
    background-color: #2a2a2a;
    padding: 0.4rem 0.8rem; /* 여백 살짝 증가 */
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.factor-item:last-child {
    margin-bottom: 0;
}

.factor-item input[type="checkbox"] {
    margin-right: 0.8rem;
    width: 15px; /* 체크박스 크기 적절히 확대 */
    height: 15px;
    flex-shrink: 0;
}

.factor-item span {
    font-size: 0.75rem; /* 글씨 크기 적절히 확대 */
    color: #eee;
    font-weight: 500;
}

.tiny-text {
    font-size: 0.75rem; /* 0.9rem에서 다시 0.75rem으로 복구 */
    color: #ccc;
    line-height: 1.4;
    text-align: left;
    margin-bottom: 0.6rem;
}

/* Contact Section Styles */
.contact-section {
    padding: 6rem 2rem;
    background-color: #161616;
}

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

.contact-container h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.contact-container p {
    color: #bbb;
    margin-bottom: 3rem;
}

.contact-form {
    background-color: var(--card-background);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #eee;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 8px rgba(3, 218, 198, 0.3);
}

.submit-btn {
    width: 100%;
    padding: 1.2rem;
    background-color: var(--accent-color);
    color: #121212;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 1rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(3, 218, 198, 0.4);
}

footer {
    padding: 2rem 0;
    font-size: 0.9rem;
    color: #888;
}

@media (max-width: 600px) {
    .accident-types {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
}
