/* --- styles8.css (FINAL V100) --- */

:root {
    --mystic-blue: #00ddee;
    --royal-gold: #d4af37;
    --glass-bg: rgba(10, 20, 30, 0.95);
    --neon-cyan: #00ffff;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #020408;
    background-image: url('main_bg.jpg');
    background-size: cover;
    background-position: center;
    font-family: 'Georgia', serif;
    color: #a0c0ff;
    display: flex;
    flex-direction: column;
}

header {
    flex-shrink: 0;
    z-index: 100;
    background: rgba(5, 10, 16, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 221, 238, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    padding-bottom: 5px;
    position: relative;
}

h1 {
    font-family: 'Cinzel', serif;
    text-align: center;
    margin: 12px 0;
    font-size: 1.5rem;
    letter-spacing: 4px;
    color: #ffffff;
    text-shadow: 0 0 5px var(--mystic-blue), 0 0 15px var(--mystic-blue);
    animation: whitePulse 4s infinite alternate;
}

h1 span {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.4em;
    vertical-align: middle;
    margin-right: 2px;
}

@keyframes whitePulse {
    0% {
        text-shadow: 0 0 5px var(--mystic-blue);
        opacity: 0.9;
    }

    100% {
        text-shadow: 0 0 25px var(--mystic-blue), 0 0 40px #fff;
        opacity: 1;
    }
}

/* GWIAZDA POMOCY */
.guide-star {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.2rem;
    color: var(--mystic-blue);
    cursor: pointer;
    z-index: 110;
    animation: twinkle 3s infinite ease-in-out;
    transition: transform 0.3s;
}

.guide-star svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    filter: drop-shadow(0 0 5px var(--mystic-blue));
}

.guide-star:hover {
    transform: scale(1.2) rotate(15deg);
    color: #fff;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
        filter: drop-shadow(0 0 10px #fff);
    }
}

/* MENU */
.intent-section {
    padding: 2px 0;
}

.tags-container {
    display: flex;
    gap: 8px;
    padding: 5px 15px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
}

.tags-container::-webkit-scrollbar {
    display: none;
}

@media (min-width: 600px) {
    .tags-container {
        justify-content: center;
    }
}

.intent-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #8ab;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s;
}

.intent-btn.active {
    background: rgba(0, 221, 238, 0.15);
    border-color: var(--mystic-blue);
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 221, 238, 0.25);
}

.category-desc {
    text-align: center;
    font-size: 0.75rem;
    color: #00ddee;
    height: 1.2em;
    margin-top: 4px;
    font-style: italic;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 1);
    opacity: 0.9;
    transition: opacity 0.3s;
}

/* ZODIAK */
.zodiac-wrapper {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 5px;
}

.zodiac-container {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 8px 15px;
    padding-right: 40px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

@media (min-width: 600px) {
    .zodiac-container {
        justify-content: center;
        padding-right: 0;
    }
}

.zodiac-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0.6;
}

.zodiac-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #8ab;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.3s;
}

.zodiac-btn:hover {
    opacity: 1;
    border-color: var(--mystic-blue);
}

.zodiac-btn.active {
    opacity: 1;
    background: rgba(0, 221, 238, 0.1);
    border-color: var(--mystic-blue);
    box-shadow: 0 0 10px rgba(0, 221, 238, 0.3);
    transform: scale(1.15);
}

.zodiac-btn.active svg {
    stroke: var(--mystic-blue);
    filter: drop-shadow(0 0 4px var(--mystic-blue));
}

/* MAIN AREA */
main.content-area {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

/* GRID */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    width: 100%;
    max-width: 320px;
    max-height: 100%;
    overflow-y: auto;
    gap: 15px;
    padding: 5px;
    scrollbar-width: none;
}

.grid-container::-webkit-scrollbar {
    display: none;
}

.symbol-button {
    aspect-ratio: 1/1;
    font-size: clamp(1.4rem, 4vh, 2rem);
    background: linear-gradient(135deg, rgba(20, 30, 40, 0.5), rgba(5, 10, 15, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #b0c0d0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-shadow: 0 0 5px rgba(0, 221, 238, 0.4);
    animation: fadeIn 0.4s ease-out backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.symbol-button.selected {
    border-color: var(--mystic-blue);
    color: #fff;
    background: rgba(0, 221, 238, 0.15);
    box-shadow: 0 0 20px rgba(0, 221, 238, 0.4);
    transform: scale(1.05);
    z-index: 2;
    text-shadow: 0 0 10px var(--mystic-blue), 0 0 20px var(--mystic-blue);
}

.pure-orb {
    width: 60%;
    height: 60%;
    border-radius: 50%;
    background-color: currentColor;
    opacity: 0.6;
    box-shadow: 0 0 5px currentColor;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.symbol-button.selected .pure-orb {
    opacity: 0.9;
    box-shadow: 0 0 15px currentColor, 0 0 30px currentColor;
    transform: scale(1.15);
    border-color: #fff;
}

/* TAROT */
.tarot-spreads {
    display: none;
    flex-direction: column;
    gap: 12px;
    width: 90%;
    max-width: 300px;
    margin: auto;
}

.spread-btn {
    background: rgba(20, 15, 5, 0.85);
    border: 1px solid #554433;
    border-left: 3px solid var(--royal-gold);
    padding: 12px 15px;
    color: #ddd;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 4px;
    text-align: left;
    cursor: pointer;
    transition: transform 0.2s;
}

.spread-btn:hover {
    background: rgba(30, 20, 10, 0.9);
}

.spread-btn:active {
    transform: scale(0.98);
}

.spread-icon {
    font-size: 1.8rem;
    color: var(--royal-gold);
    flex-shrink: 0;
}

.spread-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.spread-info b {
    font-family: 'Cinzel Decorative', serif;
    color: #fff;
    font-size: 1rem;
    letter-spacing: 1px;
    line-height: 1.2;
}

.spread-info small {
    font-size: 0.75rem;
    color: #a6b0c0;
    font-style: italic;
}

.tarot-board {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    justify-content: center;
    position: relative;
}

.cards-layout {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 10px;
}

.card-slot {
    width: 80px;
    height: 128px;
    perspective: 1000px;
    cursor: pointer;
}

@media (min-width: 1024px) {
    .card-slot {
        width: 160px;
        height: 256px;
        margin: 10px;
    }

    .card-symbol {
        font-size: 4rem !important;
    }

    .card-name {
        font-size: 1rem !important;
    }

    .card-back::after {
        font-size: 4rem !important;
    }

    .cards-layout {
        gap: 30px;
    }
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.card-slot.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background: #111;
    border: 2px solid #654;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: radial-gradient(var(--royal-gold) 1px, transparent 1px);
    background-size: 10px 10px;
    opacity: 0.9;
}

.card-back::after {
    content: '✦';
    color: var(--royal-gold);
    font-size: 2rem;
    background: #000;
    padding: 2px;
    border-radius: 50%;
}

.card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    background: #e8e0cc;
    border: 3px solid #111;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.5);
}

.card-symbol {
    font-size: 2.2rem;
    color: #222;
    margin-bottom: 5px;
}

.card-name {
    font-family: 'Cinzel Decorative', serif;
    font-size: 0.65rem;
    font-weight: bold;
    color: #443322;
    text-transform: uppercase;
}

.back-btn {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid var(--royal-gold);
    color: var(--royal-gold);
    padding: 10px 30px;
    border-radius: 20px;
    font-family: 'Cinzel Decorative', serif;
    font-size: 0.85rem;
    margin-top: 15px;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
    cursor: pointer;
    z-index: 10;
    position: relative;
}

/* --- I-CHING NEON STYLES --- */
.hexagram-stage {
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 10px;
}

.hex-line {
    width: 220px;
    height: 25px;
    background: rgba(0, 221, 238, 0.1);
    border: 1px solid rgba(0, 221, 238, 0.3);
    transition: all 0.3s ease-out;
    opacity: 0.3;
}

.hex-line.yang {
    background: var(--neon-cyan);
    opacity: 1 !important;
    border: none;
    box-shadow: 0 0 10px var(--mystic-blue), 0 0 20px var(--mystic-blue), 0 0 40px var(--mystic-blue);
}

.hex-line.yin {
    background: transparent;
    border: none;
    opacity: 1 !important;
    box-shadow: none;
    display: flex;
    justify-content: space-between;
}

.hex-line.yin::before,
.hex-line.yin::after {
    content: '';
    width: 42%;
    height: 100%;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--mystic-blue), 0 0 20px var(--mystic-blue), 0 0 40px var(--mystic-blue);
}

/* --- ORBITAL SYSTEM (SFERY) --- */
.orbit-system {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orbit-circle {
    position: absolute;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 50%;
    pointer-events: none;
}

.r1 {
    width: 120px;
    height: 120px;
    animation: spin 20s linear infinite;
}

.r2 {
    width: 220px;
    height: 220px;
    animation: spin 30s linear infinite reverse;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Fixy mobilne */
@media (max-height: 500px) and (orientation: landscape) {
    .grid-container {
        grid-template-columns: repeat(6, 1fr) !important;
        max-width: 600px;
        gap: 8px;
        margin-top: 5px;
        padding-bottom: 20px;
    }

    .zodiac-wrapper {
        display: none;
    }

    h1 {
        display: none;
    }

    .category-desc {
        display: none;
    }

    .symbol-button {
        font-size: 1.2rem;
    }

    .cards-layout {
        gap: 10px;
    }

    .card-slot {
        width: 60px;
        height: 100px;
    }

    .card-symbol {
        font-size: 1.5rem !important;
    }
}

/* MODALE (POPRAWIONE UKRYWANIE) */
.modal-overlay,
.help-modal {
    display: none;
    /* KLUCZOWE - FIZYCZNE UKRYCIE */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

/* Dopiero klasa .show włącza Flexa */
.modal-overlay.show,
.help-modal.show {
    display: flex;
    animation: fadeIn 0.3s;
}

/* GLOBALNY SCROLL FIX DLA MOBILE (Dla obu klas modali) */
.modal-content,
.help-content {
    background: linear-gradient(135deg, #111, #222);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--royal-gold);
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
    animation: slideUp 0.4s ease-out;

    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Ukryty scrollbar ale funkcjonalny */
.modal-content::-webkit-scrollbar,
.help-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-thumb,
.help-content::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-track,
.help-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.modal-content h2 {
    color: var(--neon-cyan);
    margin-bottom: 15px;
}

.modal-content p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-content button {
    background: transparent;
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

.help-content {
    background: #111;
    border: 1px solid var(--mystic-blue);
    padding: 30px;
    border-radius: 10px;
    max-width: 90%;
    width: 400px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 221, 238, 0.2);
}

#responseModalContent p {
    font-size: 1rem;
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 15px;
}

#closeResponseModalBtn {
    background: var(--mystic-blue);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

.help-close {
    margin-top: 10px;
    background: transparent;
    border: 1px solid var(--mystic-blue);
    color: var(--mystic-blue);
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.help-close:hover {
    background: var(--mystic-blue);
    color: #000;
}

.mute-button {
    position: fixed;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: #555;
    border: 1px solid #333;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 90;
}

.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(5, 10, 20, 0.95);
    border: 1px solid var(--mystic-blue);
    color: var(--mystic-blue);
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 0 10px rgba(0, 221, 238, 0.2);
}

.toast-notification.show {
    opacity: 1;
}

.action-btn {
    padding: 15px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    font-size: 1rem;
    background: rgba(5, 20, 30, 0.95);
    border: 1px solid #00ddee;
    color: #00ddee;
    transition: 0.3s;
    box-shadow: 0 0 10px #00ddee;
}

.action-btn:hover {
    background: #00ddee;
    color: #000;
    box-shadow: 0 0 20px #00ddee;
}

/* --- STYLE DLA MODALA POWITALNEGO (WYBÓR PŁCI) --- */

.gender-selection-container {
    display: flex;
    flex-direction: column;
    /* Na telefonach pionowo */
    gap: 15px;
    margin-top: 25px;
    align-items: center;
    width: 100%;
}

/* Na większych ekranach poziomo */
@media (min-width: 600px) {
    .gender-selection-container {
        flex-direction: row;
        justify-content: center;
    }
}

.gender-button {
    background: rgba(0, 20, 30, 0.8);
    border: 1px solid #00ddee;
    color: #00ddee;
    padding: 12px 25px;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    min-width: 120px;
    /* Żeby były równe */
    box-shadow: 0 0 10px rgba(0, 221, 238, 0.1);
}

.gender-button:hover {
    background: #00ddee;
    color: #000;
    /* Czarny tekst na jasnym tle */
    box-shadow: 0 0 20px #00ddee;
    transform: translateY(-2px);
}

/* Przycisk "Obserwator" (ten na samym dole) */
#closeInfoWyroczniaModalBtn {
    margin-top: 30px;
    background: transparent;
    border: 1px solid #555;
    color: #777;
    padding: 8px 20px;
    font-size: 0.75rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#closeInfoWyroczniaModalBtn:hover {
    border-color: #888;
    color: #bbb;
    background: rgba(255, 255, 255, 0.05);
}

/* --- DZIENNIK HISTORII --- */
.journal-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.journal-entry {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 15px;
    text-align: left;
    transition: 0.3s;
}

.journal-entry:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(212, 175, 55, 0.5);
}

.journal-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: #888;
}

.j-type {
    color: #d4af37;
    font-weight: bold;
}

.journal-title {
    font-family: 'Cinzel', serif;
    color: #eee;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.journal-summary {
    color: #ccc;
    font-style: italic;
    font-size: 0.9rem;
}

.journal-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.4;
    max-height: 100px;
    overflow-y: auto;
}

/* --- MISTYCZNE IKONY TAROTA --- */
.card-symbol {
    font-size: 3rem !important;
    line-height: 1;
    display: block;
    /* Złoty Pył Filter */
    filter: sepia(100%) saturate(300%) hue-rotate(10deg) brightness(1.1) contrast(1.2);
    /* Poświata */
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.8), 0 0 30px rgba(255, 215, 0, 0.4);
    /* Animacja Pulsowania */
    animation: symbolPulse 4s infinite ease-in-out;
}

@keyframes symbolPulse {
    0% {
        transform: scale(1);
        filter: sepia(100%) saturate(300%) hue-rotate(10deg) brightness(1.1);
    }

    50% {
        transform: scale(1.05);
        filter: sepia(100%) saturate(400%) hue-rotate(10deg) brightness(1.3);
        text-shadow: 0 0 25px rgba(212, 175, 55, 1);
    }

    100% {
        transform: scale(1);
        filter: sepia(100%) saturate(300%) hue-rotate(10deg) brightness(1.1);
    }
}