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

body {
    background: #07030d;
    background-image: 
        radial-gradient(circle at 20% 30%, #1c0f30 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, #0d2038 0%, transparent 50%);
    color: #e5def1;
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    width: 100%;
    z-index: 2;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    letter-spacing: 6px;
    color: #cca3ff;
    margin-bottom: 1rem;
    opacity: 0.8;
}

header h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: #fff;
    text-shadow: 0 0 20px rgba(186, 131, 255, 0.3);
    margin-bottom: 15px;
    line-height: 1.2;
}

.subtitle {
    font-weight: 300;
    color: #9f94b3;
    max-width: 600px;
    margin: 0 auto 3rem auto;
    line-height: 1.6;
    font-size: 0.95rem;
}

.tarot-deck {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 15px;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto 3rem auto;
    padding: 0 10px;
}

.card {
    width: 100%;
    aspect-ratio: 1 / 1.7;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

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

.card-back {
    background: #140d21;
    border: 2px solid #3c265c;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-back::before {
    content: "";
    position: absolute;
    width: 85%;
    height: 90%;
    border: 1px dashed #54397e;
    border-radius: 8px;
}

.card-back::after {
    content: "✦";
    font-size: 2rem;
    color: #835dc2;
    text-shadow: 0 0 10px #835dc2;
}

.card-front {
    background: linear-gradient(145deg, #1f1435, #0f081d);
    transform: rotateY(180deg);
    border: 2px solid #bba1f5;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem 0.5rem;
    align-items: center;
}

.card-icon { 
    font-size: 2.2rem; 
    margin-top: 10px;
}

.card-title {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    text-align: center;
    word-break: break-word;
    margin-bottom: 10px;
}

.analysis-container {
    background: rgba(16, 10, 28, 0.85);
    border: 1px solid #3e2665;
    border-radius: 20px;
    padding: 2.5rem 1.5rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    animation: slideUp 0.8s ease forwards;
    text-align: center;
    margin-top: 2rem;
}

.seal { font-size: 2.5rem; margin-bottom: 0.5rem; }

.analysis-container h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    letter-spacing: 2px;
    color: #cca3ff;
    margin-bottom: 2rem;
}

.chosen-cards-summary {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.03);
    padding: 10px 15px;
    border-radius: 10px;
    min-width: 100px;
}

.summary-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9f94b3;
}

.summary-name {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: #fff;
}

.divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #4e337e, transparent);
    margin: 2rem 0;
}

.reading-section {
    text-align: left;
    max-width: 800px;
    margin: 0 auto 2rem auto;
}

.reading-section h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: #bfa3ff;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.reading-text {
    font-size: 0.95rem;
    color: #cfc5e3;
    line-height: 1.7;
    font-weight: 300;
}

.mystic-btn {
    background: transparent;
    color: #bfa3ff;
    border: 1px solid #bfa3ff;
    padding: 12px 30px;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    width: 100%;
    max-width: 320px;
}

.mystic-btn:hover {
    background: #bfa3ff;
    color: #07030d;
    box-shadow: 0 0 20px rgba(191, 163, 255, 0.4);
}

@media (min-width: 768px) {
    header h1 { font-size: 3.5rem; letter-spacing: 6px; }
    .tarot-deck { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 20px; }
    .analysis-container { padding: 3.5rem 3rem; }
    .reading-section h3 { font-size: 1.25rem; }
    .reading-text { font-size: 1.05rem; }
    .mystic-btn { width: auto; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
