@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;700&display=swap");

:root {
    --primary-color: #C13584; /* A warm, inviting pink */
    --secondary-color: #FCAF45; /* A friendly, approachable orange */
    --accent-color: #405DE6; /* A trustworthy blue */
    --background-color: #FAF9F6; /* A soft, off-white */
    --text-color: #333;
    --light-gray: #f0eef2;
    --dark-gray: #666;
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --interactive-glow: 0 0 15px rgba(193, 53, 132, 0.5);
    --noise-texture: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><filter id="n" x="0" y="0" width="100%" height="100%"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100" height="100" filter="url(%23n)" opacity="0.05"/></svg>');
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--noise-texture);
    pointer-events: none;
    z-index: -1;
}

header {
    text-align: center;
    padding: 4rem 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-bottom-left-radius: 50% 20%;
    border-bottom-right-radius: 50% 20%;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%; 
    left: -50%;
    width: 200%; 
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 60%);
    animation: subtle-shine 10s infinite alternate;
}

@keyframes subtle-shine {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

header .subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.9;
}

main {
    flex-grow: 1;
    padding: 2rem 1rem;
    max-width: 900px;
    margin: -2rem auto 0;
    width: 100%;
    position: relative;
    z-index: 10;
}

#intro {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
    text-align: center;
}

#intro h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.step {
    text-align: center;
}

.step-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.step:hover .step-icon {
    transform: scale(1.2) rotate(10deg);
}

.step h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

#user-input-form {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
}

#user-input-form h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

form fieldset {
    border: none;
    margin-bottom: 2rem;
    padding: 0;
}

form legend {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    width: 100%;
}

form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 1rem;
}

form input[type="text"],
form input[type="date"],
form input[type="time"],
form input[type="number"],
form input[type="file"],
form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    margin-bottom: 1.2rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

form input:focus,
form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 8px rgba(252, 175, 69, 0.5);
}

.photo-preview {
    margin-top: 1rem;
    text-align: center;
}

#photo-preview-img {
    max-width: 100%;
    max-height: 250px;
    border-radius: 8px;
    border: 3px dashed var(--light-gray);
    padding: 5px;
}

.cta-button {
    display: block;
    width: 100%;
    padding: 1rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--interactive-glow), 0 8px 25px rgba(0,0,0,0.3);
}

footer {
    background: var(--text-color);
    color: var(--background-color);
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
}

.disclaimer {
    font-size: 0.8rem;
    color: var(--dark-gray);
    margin-top: 1rem;
}


@media (max-width: 768px) {
    header h1 { font-size: 2.8rem; }
    header .subtitle { font-size: 1.2rem; }
    #intro h2, #user-input-form h2 { font-size: 1.8rem; }
    form legend { font-size: 1.3rem; }
    .cta-button { font-size: 1.2rem; }
}

/* New styles for features */

/* Hidden Class */
.hidden {
    display: none;
}

/* Drop Zone */
#drop-zone {
    border: 3px dashed var(--light-gray);
    border-radius: 12px;
    padding: 3rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    position: relative;
    background-color: #fff;
}

#drop-zone.drag-over {
    border-color: var(--primary-color);
    background-color: var(--light-gray);
}

#drop-zone p {
    font-size: 1.1rem;
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

#drop-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Image Preview */
#image-preview {
    margin-top: 1.5rem;
    position: relative;
}

#image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Loader for Results Page */
.loader {
    border: 8px solid var(--light-gray);
    border-top: 8px solid var(--primary-color);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 1.5s linear infinite;
    margin: 3rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Result Page and Content */
#result-page {
    text-align: center;
}

#resultContent {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    text-align: left;
}

.result-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.result-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.result-item h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.result-item p {
    font-size: 1rem;
    color: var(--dark-gray);
    margin-bottom: 0.25rem;
}

/* Button styles - repurposing existing CTA button style if needed */
#showResultBtn {
    display: block;
    width: 100%;
    padding: 1rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin-top: 2rem;
}

#showResultBtn:hover {
    transform: translateY(-3px);
    box-shadow: var(--interactive-glow), 0 8px 25px rgba(0,0,0,0.3);
}
