body {
    font-family: 'Gowun Dodum', sans-serif;
    margin: 0;
    background-color: #1a1a2e;
    color: #e0e0e0;
    text-align: center;
    background-image: url('https://www.transparenttextures.com/patterns/stardust.png');
}

header {
    padding: 2rem 0;
}

header h1 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    margin: 0;
    color: #f0a500;
    text-shadow: 0 0 10px #f0a500, 0 0 20px #f0a500;
}

#card-deck {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 2rem;
    perspective: 1000px;
}

.card {
    width: 150px;
    height: 250px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-10px);
}

.card.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.card-back {
    background: linear-gradient(135deg, #6d32ed, #b0239e);
    border: 2px solid #f0a500;
}

.card-front {
    background-color: #2c2c54;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.card-front img {
    width: 80%;
    height: auto;
}

#result-display {
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

#result-display h2 {
    color: #f0a500;
}

/* New styles for worry input and counseling display */
#worry-input-section {
    padding: 2rem;
    max-width: 600px;
    margin: 2rem auto;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#worry-input-section h2 {
    color: #f0a500;
    margin-bottom: 1.5rem;
}

#user-worry {
    width: 80%;
    padding: 1rem;
    border: 1px solid #6d32ed;
    border-radius: 8px;
    background-color: #2c2c54;
    color: #e0e0e0;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1.5rem;
}

#user-worry::placeholder {
    color: #a0a0a0;
}

#get-counseling-button {
    background-color: #f0a500;
    color: #1a1a2e;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#get-counseling-button:hover {
    background-color: #ffbf00;
    transform: translateY(-2px);
}

#card-selection-display {
    padding: 1.5rem;
    max-width: 600px;
    margin: 2rem auto;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#card-selection-display h3 {
    color: #f0a500;
    margin-bottom: 1rem;
}

#counseling-result-display {
    padding: 2rem;
    max-width: 700px;
    margin: 2rem auto;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    text-align: left;
}

#counseling-result-display h2 {
    color: #f0a500;
    margin-bottom: 1.5rem;
    text-align: center;
}

#counseling-result-display p {
    line-height: 1.6;
    margin-bottom: 1rem;
}