:root {
    --bg-primary: #FFF7FA;
    --text-primary: #5C3D4E;
    --text-secondary: #8C6B7E;
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-border: rgba(255, 217, 230, 0.7);
    --accent-color: #FFB6C1; /* LightPink */
    --accent-hover: #FFAEC9;
    --shadow-light: 0 4px 15px rgba(255, 182, 193, 0.1);
    --shadow-medium: 0 8px 30px rgba(255, 182, 193, 0.15);
}

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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "system-ui", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
    background: linear-gradient(-45deg, #FFDEE9, #FFB6C1, #FFD1E3, #FFF0F5);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

header {
    padding: 20px 5%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.1);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

nav ul li a:hover, nav ul li a.active {
    color: var(--accent-color);
}

main {
    flex-grow: 1;
    padding: 40px 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.intro-section {
    text-align: center;
    max-width: 800px;
}

.intro-section h1 {
    font-size: 3.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.15);
    margin-bottom: 15px;
}

.intro-section p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* Animation for homepage elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.intro-section h1,
.intro-section p,
.card {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.intro-section h1 { animation-delay: 0.2s; }
.intro-section p { animation-delay: 0.4s; }
.card { animation-delay: 0.6s; }


/* Subpage Content Styling */
.text-content-section {
    width: 100%;
    max-width: 700px;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-medium);
}

.text-content-section h1 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-primary);
    font-size: 2.5rem;
    text-shadow: none;
}

.text-content-section h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 5px;
}

.text-content-section p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.text-content-section p:last-child {
    margin-bottom: 0;
}

.text-content-section p.highlight {
    background-color: rgba(255, 182, 193, 0.15);
    padding: 20px;
    border-radius: 12px;
    color: var(--text-primary);
}

.text-content-section a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.text-content-section a:hover {
    text-decoration: underline;
}

.contact-email {
    text-align: center;
    margin: 30px 0 !important;
}

.contact-email a {
    font-size: 1.3rem;
    background: var(--accent-color);
    color: #fff;
    padding: 15px 30px;
    border-radius: 12px;
    transition: background 0.3s;
}

.contact-email a:hover {
    background: var(--accent-hover);
    text-decoration: none;
}

.card {
    width: 100%;
    max-width: 500px;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-medium);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    overflow: hidden;
}

.card-header {
    padding: 18px;
    font-weight: 700;
    font-size: 1.2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
    border-bottom: 1px solid var(--card-border);
}

.card-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#result-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#result-section.visible {
    opacity: 1;
    transform: translateY(0);
}

#result-container {
    text-align: center;
}

#result-container h2.result-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 15px;
}

#result-container p.result-explanation {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto 30px auto;
}

#label-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.prediction-bar {
    display: grid;
    grid-template-columns: 100px 1fr 60px;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateX(-20px);
    animation: slideIn 0.5s forwards;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.class-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    text-align: left;
}

.bar-container {
    width: 100%;
    height: 12px;
    background-color: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
}

.bar {
    width: 0%;
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 6px;
    transition: width 0.8s ease-out;
}

.percentage {
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent-color);
    text-align: right;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.action-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.restart-btn {
    background-color: #fff;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.restart-btn:hover {
    background-color: var(--accent-color);
    color: #fff;
}

.share-btn {
    background-color: var(--accent-color);
    color: #fff;
    border: 1px solid var(--accent-color);
}

.share-btn:hover {
    background-color: var(--accent-hover);
}

footer {
    text-align: center;
    padding: 25px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .intro-section h1 { font-size: 2.5rem; }
    .intro-section p { font-size: 1.1rem; }
    .text-content-section { padding: 30px 20px; }
    .card-content { padding: 20px; }
    nav ul { gap: 20px; }
    nav ul li a { font-size: 1rem; }
}
