:root {
    --color-orange: #ff7518;
    --color-black: #000000;
    --color-purple: #2e003e;
    --color-lime: #b2ebf2;
    --color-lime-accent: #c6ff00;
    --color-text: #f0f0f0;
    --color-card-bg: #1a1a1a;

    --font-heading: 'Creepster', cursive;
    --font-body: 'Noto Serif JP', serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-black);
    color: var(--color-text);
    font-family: var(--font-body);
    background-image: radial-gradient(circle at 50% 50%, #1a0520 0%, #000000 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.app-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 2px solid var(--color-orange);
}

h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--color-orange);
    text-shadow: 0 0 10px rgba(255, 117, 24, 0.5);
    letter-spacing: 2px;
}

.subtitle {
    color: var(--color-lime-accent);
    font-size: 1.2rem;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Memo Area */
.memo-section {
    display: flex;
    justify-content: center;
}

#memo-area {
    width: 100%;
    max-width: 600px;
    height: 100px;
    background-color: rgba(46, 0, 62, 0.5);
    border: 1px solid var(--color-purple);
    border-radius: 8px;
    padding: 1rem;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#memo-area:focus {
    border-color: var(--color-orange);
    box-shadow: 0 0 10px rgba(255, 117, 24, 0.3);
}

#memo-area::placeholder {
    color: rgba(240, 240, 240, 0.5);
}

/* Controls */
.controls-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    background: rgba(20, 20, 20, 0.8);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #333;
}

.spread-selector {
    display: flex;
    gap: 2rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 1.1rem;
}

.radio-label input[type="radio"] {
    accent-color: var(--color-orange);
    transform: scale(1.2);
}

.buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 2rem;
    font-family: var(--font-body);
    font-weight: bold;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.btn:active {
    transform: translateY(0);
}

.primary-btn {
    background-color: var(--color-purple);
    color: white;
    border: 1px solid var(--color-lime-accent);
}

.secondary-btn {
    background-color: #333;
    color: #ccc;
}

.accent-btn {
    background-color: var(--color-orange);
    color: var(--color-black);
    font-weight: 800;
}

/* Result Area */
.result-area {
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.placeholder-message {
    color: #666;
    font-style: italic;
    font-size: 1.2rem;
}

/* One Oracle Layout */
.one-oracle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: fadeIn 1s ease;
}

/* Tarot Card Styling */
.tarot-card {
    width: 200px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
    border: 2px solid #444;
    transition: transform 0.3s, border-color 0.3s;
}

.tarot-card:hover {
    transform: scale(1.05);
    border-color: var(--color-orange);
}

.card-info {
    text-align: center;
}

.card-name {
    font-size: 1.5rem;
    color: var(--color-orange);
    margin-bottom: 0.2rem;
}

.card-position {
    font-size: 1rem;
    color: #aaa;
}

/* Horoscope Layout */
.horoscope-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.horoscope-card-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: fadeIn 0.5s ease backwards;
}

.horoscope-card-wrapper img {
    width: 100%;
    max-width: 120px;
    border-radius: 6px;
    border: 2px solid #444;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s, border-color 0.3s;
}

.horoscope-card-wrapper img:hover {
    border-color: var(--color-orange);
    transform: scale(1.05);
}

.house-label {
    font-size: 0.9rem;
    color: var(--color-lime-accent);
    font-weight: bold;
}

.card-mini-name {
    font-size: 0.8rem;
    text-align: center;
    color: #ddd;
}

/* Tooltip */
.tooltip {
    visibility: hidden;
    background-color: var(--color-purple);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 10;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--color-orange);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.horoscope-card-wrapper:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Action Section */
.action-section {
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.hidden {
    display: none !important;
}

/* Card Meaning Display */
#card-meaning-display {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    color: var(--color-orange);
    text-align: center;
    padding: 1rem;
    font-size: 1.2rem;
    border-top: 2px solid var(--color-purple);
    z-index: 100;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease-in-out;
}

#card-meaning-display.hidden {
    transform: translateY(100%);
    display: block !important;
    /* Override generic hidden */
}

/* Horoscope Overall Card */
.horoscope-overall {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px dashed #444;
    width: 100%;
    animation: fadeIn 0.5s ease backwards;
}

.horoscope-overall img {
    width: 140px;
    border-radius: 8px;
    border: 2px solid var(--color-orange);
    box-shadow: 0 0 15px rgba(255, 117, 24, 0.3);
    transition: transform 0.3s;
}

.horoscope-overall img:hover {
    transform: scale(1.1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
    }

    .spread-selector {
        flex-direction: column;
        gap: 1rem;
    }

    .horoscope-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .horoscope-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}