body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('./images/web_background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

h1 {
    color: #ffd700;
    margin-bottom: 40px;
}

#question-section {
    margin-bottom: 40px;
}

input[type="text"] {
    width: 80%;
    padding: 12px;
    margin: 20px 0;
    border: none;
    border-radius: 5px;
    background: #ffffff1a;
    color: #fff;
    font-size: 16px;
}

button {
    padding: 12px 24px;
    background: #ffd700;
    border: none;
    border-radius: 5px;
    color: #1a1a2e;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
}

button:hover {
    transform: scale(1.05);
}

.cards-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.card {
    width: 150px;
    height: 250px;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

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

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
}

.card-back {
    background: url('./images/card_back.png');
    background-size: cover;
    background-position: center;
    border: 2px solid #fff;
}

.card-front {
    background: #fff;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    padding: 10px;
    text-align: center;
    color: #1a1a2e;
    background-size: cover;
    background-position: center;
    border: 2px solid #ffd700;
}

.card-name {
    position: absolute;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
}

.hidden {
    display: none;
}

#interpretation {
    margin-top: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.059);
    border-radius: 10px;
}

#reading-text {
    text-align: left;
    line-height: 1.6;
    padding: 20px;
}

#reading-text h3 {
    color: #ffd700;
    margin-top: 20px;
    margin-bottom: 10px;
}

#reading-text p {
    margin-bottom: 20px;
}

.site-header {
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem 0;
    margin-bottom: 2rem;
    text-align: center;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 0 2rem;
}

.header-content h1 {
    margin: 0;
    color: #ffd700;
    font-size: 2.5rem;
}

.language-selector {
    display: flex;
    gap: 1rem;
}

.lang-btn {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid #ffd700;
    color: #ffd700;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.lang-btn:hover {
    background: rgba(255, 215, 0, 0.2);
}

.lang-btn.active {
    background: #ffd700;
    color: #000;
}

.card-front.reversed {
    transform: rotateY(180deg) rotate(180deg);
}

.card-front.reversed .card-name {
    transform: rotate(180deg);
    bottom: auto;
    top: 10px;
}

.error-message {
    color: #ff6b6b;
    padding: 15px;
    border-left: 3px solid #ff6b6b;
    background: rgba(255, 107, 107, 0.15);
    margin: 15px 0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.retry-button {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 15px;
}

.retry-button:hover {
    background: rgba(255, 107, 107, 0.3);
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
} 

/* Hourglass animation */
.hourglass {
    display: inline-block;
    width: 32px;
    height: 32px;
    position: relative;
    margin-right: 10px;
  }
  .hourglass-top, .hourglass-bottom {
    position: absolute;
    left: 6px;
    width: 20px;
    height: 10px;
    border: 2px solid #ffd700;
    border-radius: 10px 10px 0 0;
    background: #fff8dc;
    z-index: 2;
  }
  .hourglass-top {
    top: 0;
    border-bottom: none;
  }
  .hourglass-bottom {
    bottom: 0;
    border-top: none;
    border-radius: 0 0 10px 10px;
  }
  .hourglass-sand {
    position: absolute;
    left: 15px;
    top: 10px;
    width: 2px;
    height: 12px;
    background: #ffd700;
    z-index: 3;
    animation: sand-fall 1.2s linear infinite;
  }
  @keyframes sand-fall {
    0% { height: 0; opacity: 1; }
    40% { height: 12px; opacity: 1; }
    80% { height: 12px; opacity: 0.7; }
    100% { height: 0; opacity: 0.3; }
  }
  .hourglass-frame {
    position: absolute;
    left: 6px;
    top: 10px;
    width: 20px;
    height: 12px;
    border-left: 2px solid #ffd700;
    border-right: 2px solid #ffd700;
    z-index: 1;
  }

.site-header {
    position: relative; /* Ensure the header is the positioning context */
}

.witch-below-btn {
    display: block;
    margin: 30px auto 0 auto;
    width: 180px;   /* Make it larger */
    max-width: 90vw;
    height: auto;
    z-index: 10;
    pointer-events: none;
    user-select: none;
}

/* Ad container styling */
.ad-container {
    margin: 30px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ad-container ins {
    margin: 0 auto;
    display: block;
}

/* Hide ad initially, show after interpretation */
#interpretation-ad {
    display: none;
}

#interpretation-ad.show {
    display: block;
}