/* AI Tarot Plugin Styles */
/* WordPress Tema Override - Yüksek Öncelik */
.tarot-container,
.ai-tarot-reader,
#ai-tarot-reader {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

.tarot-container *,
.ai-tarot-reader *,
#ai-tarot-reader * {
    box-sizing: border-box;
}

/* Modern Renkler */
.tarot-title {
    color: #1a1a1a !important;
    font-weight: 800 !important;
    font-size: 2.2rem !important;
}

.tarot-subtitle {
    color: #444 !important;
    font-weight: 500 !important;
    opacity: 0.9 !important;
}

:root {
    --tarot-primary: #4a0e4e;
    --tarot-secondary: #8e4ec6;
    --tarot-accent: #d4af37;
    --tarot-dark: #2c1810;
    --tarot-light: #f8f4e6;
    --tarot-shadow: rgba(74, 14, 78, 0.3);
    --tarot-gradient: linear-gradient(135deg, #4a0e4e 0%, #8e4ec6 100%);
}

* {
    box-sizing: border-box;
}

.tarot-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--tarot-light);
    border-radius: 20px;
    box-shadow: 0 20px 60px var(--tarot-shadow);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    overflow: hidden;
}

.tarot-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--tarot-gradient);
    z-index: 1;
}

.tarot-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.tarot-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--tarot-primary);
    margin: 0 0 0.5rem 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.tarot-subtitle {
    font-size: 1.1rem;
    color: var(--tarot-dark);
    opacity: 0.8;
    margin: 0;
    font-style: italic;
}

.tarot-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.tarot-container .form-input::placeholder,
.ai-tarot-reader .form-input::placeholder,
#ai-tarot-reader .form-input::placeholder {
    color: #666 !important;
    opacity: 0.8 !important;
    font-style: italic !important;
}

.tarot-container .form-input:focus::placeholder,
.ai-tarot-reader .form-input:focus::placeholder,
#ai-tarot-reader .form-input:focus::placeholder {
    opacity: 0.5 !important;
}

.form-group {
    margin-bottom: 1.5rem;
}

.tarot-container .question-helper,
.ai-tarot-reader .question-helper,
#ai-tarot-reader .question-helper {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 0.5rem !important;
    font-size: 0.9rem !important;
}

.tarot-container .word-count,
.ai-tarot-reader .word-count,
#ai-tarot-reader .word-count {
    color: #8e4ec6 !important;
    font-weight: 600 !important;
}

.tarot-container .word-count.insufficient,
.ai-tarot-reader .word-count.insufficient,
#ai-tarot-reader .word-count.insufficient {
    color: #e74c3c !important;
}

.tarot-container .word-count.sufficient,
.ai-tarot-reader .word-count.sufficient,
#ai-tarot-reader .word-count.sufficient {
    color: #27ae60 !important;
}

.tarot-container .helper-text,
.ai-tarot-reader .helper-text,
#ai-tarot-reader .helper-text {
    color: #666 !important;
    font-style: italic !important;
    font-size: 0.85rem !important;
}

.form-group .form-label {
    text-shadow: none;
    letter-spacing: 0.3px;
}

.tarot-container .form-label,
.ai-tarot-reader .form-label,
#ai-tarot-reader .form-label {
    display: block !important;
    font-weight: 700 !important;
    color: #2c1810 !important;
    margin-bottom: 0.5rem !important;
    font-size: 1.1rem !important;
    text-shadow: none !important;
    letter-spacing: 0.3px !important;
}

/* WordPress tema override */
.tarot-container label,
.ai-tarot-reader label,
#ai-tarot-reader label {
    color: #2c1810 !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
}

/* Form group override */
.tarot-container .form-group label,
.ai-tarot-reader .form-group label,
#ai-tarot-reader .form-group label {
    color: #2c1810 !important;
    font-weight: 700 !important;
    opacity: 1 !important;
}

.form-input,
.form-select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--tarot-secondary);
    box-shadow: 0 0 0 3px rgba(142, 78, 198, 0.1);
}

.form-input {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.tarot-btn {
    background: var(--tarot-gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 200px;
}

.tarot-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--tarot-shadow);
}

.tarot-btn-primary {
    width: 100%;
}

.tarot-btn-secondary {
    background: linear-gradient(135deg, var(--tarot-accent) 0%, #f39c12 100%);
    margin-top: 1rem;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.hidden {
    display: none !important;
}

.tarot-result {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    animation: slideInUp 0.6s ease-out;
}

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

.result-header h3 {
    color: var(--tarot-primary);
    text-align: center;
    margin: 0 0 1.5rem 0;
    font-size: 1.8rem;
}

.cards-container {
    margin: 2rem 0;
}

.drawn-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.tarot-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    padding: 1rem;
    text-align: center;
    max-width: 200px;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.tarot-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    border-color: var(--tarot-accent);
}

.tarot-card.reversed {
    border-color: #e74c3c;
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

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

.card-name {
    font-weight: bold;
    color: var(--tarot-primary);
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.card-orientation {
    font-size: 0.9rem;
    color: var(--tarot-secondary);
    font-style: italic;
}

.interpretation-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
}

.interpretation-container h4 {
    color: var(--tarot-primary);
    margin: 0 0 1rem 0;
    font-size: 1.4rem;
    text-align: center;
}

.interpretation-text {
    line-height: 1.8;
    color: var(--tarot-dark);
    font-size: 1.1rem;
    text-align: justify;
}

.interpretation-text p {
    margin-bottom: 1rem;
}

.interpretation-text strong {
    color: var(--tarot-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .tarot-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .tarot-title {
        font-size: 2rem;
    }
    
    .tarot-form {
        padding: 1.5rem;
    }
    
    .drawn-cards {
        flex-direction: column;
        align-items: center;
    }
    
    .tarot-card {
        max-width: 250px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .tarot-container {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .tarot-title {
        font-size: 1.8rem;
    }
    
    .tarot-form {
        padding: 1rem;
    }
    
    .form-input,
    .form-select {
        padding: 0.8rem;
    }
    
    .tarot-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* Loading Animation */
.tarot-form.loading {
    pointer-events: none;
    opacity: 0.7;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Final WordPress Override - En Yüksek Öncelik */
body .tarot-container label,
body .ai-tarot-reader label,
body #ai-tarot-reader label,
body .tarot-container .form-label,
body .ai-tarot-reader .form-label,
body #ai-tarot-reader .form-label {
    color: #1a1a1a !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

/* Emoji'li label'lar için */
body .tarot-container label[for="tarot-question"],
body .ai-tarot-reader label[for="tarot-question"],
body #ai-tarot-reader label[for="tarot-question"],
body .tarot-container label[for="reading-type"],
body .ai-tarot-reader label[for="reading-type"],
body #ai-tarot-reader label[for="reading-type"] {
    color: #1a1a1a !important;
    font-weight: 700 !important;
    font-size: 1.15rem !important;
}

/* WordPress tema reset */
body .tarot-container,
body .ai-tarot-reader,
body #ai-tarot-reader {
    color: inherit !important;
}

body .tarot-container * {
    color: inherit;
}

body .tarot-container label * {
    color: #1a1a1a !important;
}

/* Paylaş Butonu Stilleri */
.tarot-btn-share {
    background: linear-gradient(135deg, #2196f3 0%, #21cbf3 100%) !important;
    color: white !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 25px !important;
    cursor: pointer !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    margin-top: 1rem !important;
    display: inline-block !important;
}

.tarot-btn-share:hover {
    background: linear-gradient(135deg, #1976d2 0%, #0288d1 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3) !important;
}

/* Mobil Optimizasyon ve Modern Tasarım */
@media (max-width: 768px) {
    .tarot-container {
        margin: 0.5rem !important;
        padding: 1rem !important;
        border-radius: 20px !important;
    }
    
    .tarot-title {
        font-size: 1.8rem !important;
        color: #1a1a1a !important;
        font-weight: 800 !important;
        text-align: center;
        margin-bottom: 0.5rem !important;
    }
    
    .tarot-subtitle {
        font-size: 1rem !important;
        color: #444 !important;
        font-weight: 500 !important;
        text-align: center;
        opacity: 0.9 !important;
    }
    
    /* Form etiketleri mobilde daha koyu */
    .form-label {
        color: #1a1a1a !important;
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        margin-bottom: 0.8rem !important;
    }
    
    /* Soru alanı daha modern */
    .form-input {
        font-size: 16px !important; /* iOS zoom engellemek için */
        color: #1a1a1a !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border: 2px solid #e0e0e0 !important;
        border-radius: 15px !important;
        padding: 1rem !important;
        transition: all 0.3s ease !important;
    }
    
    .form-input:focus {
        border-color: #8e4ec6 !important;
        box-shadow: 0 0 0 3px rgba(142, 78, 198, 0.2) !important;
        background: #fff !important;
    }
    
    /* Dropdown modern stil */
    .form-select {
        font-size: 16px !important;
        color: #1a1a1a !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border: 2px solid #e0e0e0 !important;
        border-radius: 15px !important;
        padding: 1rem !important;
    }
    
    /* Kelime sayacı daha belirgin */
    .word-count {
        color: #8e4ec6 !important;
        font-weight: 700 !important;
        font-size: 0.95rem !important;
    }
    
    .helper-text {
        color: #555 !important;
        font-weight: 500 !important;
        font-size: 0.9rem !important;
    }
    
    /* Buton modern tasarım */
    .tarot-btn-primary {
        font-size: 1.1rem !important;
        padding: 1rem 2rem !important;
        border-radius: 25px !important;
        font-weight: 700 !important;
        background: linear-gradient(135deg, #8e4ec6 0%, #6a1b99 100%) !important;
        color: white !important;
        border: none !important;
        box-shadow: 0 8px 25px rgba(142, 78, 198, 0.3) !important;
        transition: all 0.3s ease !important;
    }
    
    .tarot-btn-primary:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 12px 35px rgba(142, 78, 198, 0.4) !important;
    }
}

/* Genel mobil font güçlendirmeleri */
@media (max-width: 480px) {
    body .tarot-container,
    body .tarot-container * {
        color: inherit !important;
    }
    
    body .tarot-container h2,
    body .tarot-container h3,
    body .tarot-container h4 {
        color: #1a1a1a !important;
        font-weight: 700 !important;
    }
    
    body .tarot-container p,
    body .tarot-container span {
        color: #333 !important;
    }
    
    body .tarot-container label {
        color: #1a1a1a !important;
        font-weight: 700 !important;
    }
    
    /* Placeholder metni */
    .form-input::placeholder {
        color: #666 !important;
        opacity: 0.8 !important;
    }
    
    /* Select option'ları */
    .form-select option {
        color: #1a1a1a !important;
        background: white !important;
    }
}

/* Tarot yorum paragraf düzeni - Okunabilirlik için */
.tarot-interpretation {
    line-height: 1.8 !important;
    font-size: 16px !important;
    color: #333 !important;
    background: linear-gradient(135deg, #f8f9feff 0%, #fffbf3ff 100%) !important;
    padding: 25px !important;
    border-radius: 15px !important;
    box-shadow: 0 8px 25px rgba(111, 66, 193, 0.1) !important;
    margin: 20px 0 !important;
}

.tarot-interpretation p {
    margin-bottom: 18px !important;
    text-align: justify !important;
    text-justify: inter-word !important;
}

.tarot-interpretation p:last-child {
    margin-bottom: 0 !important;
}

/* Kart başlıkları için özel aralık */
.tarot-interpretation strong {
    display: block;
    margin-top: 25px !important;
    margin-bottom: 10px !important;
    color: #6f42c1 !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    padding: 8px 0 !important;
    border-bottom: 2px solid #e8f3ff !important;
}

/* Kart başlığından sonra gelen paragraf */
.tarot-interpretation strong + p {
    margin-top: 15px !important;
}

/* **Bold** text içinde olan başlıklar için */
.tarot-interpretation p:has(strong) {
    margin-top: 20px !important;
    margin-bottom: 5px !important;
}

/* İlk paragraf için özel stil */
.tarot-interpretation p:first-child {
    margin-top: 0 !important;
    font-size: 17px !important;
    font-weight: 500 !important;
    color: #6f42c1 !important;
}

/* Emojili başlıklar için */
.tarot-interpretation p:contains('🔮'),
.tarot-interpretation p:contains('✨'),
.tarot-interpretation p:contains('🌟') {
    margin-top: 25px !important;
    margin-bottom: 15px !important;
    font-weight: 600 !important;
}

/* Mobil görünüm optimizasyonu - eski cihazlar için */
@media screen and (max-width: 768px) {
    .tarot-container {
        margin: 0.5rem !important;
        padding: 1rem !important;
        width: calc(100vw - 1rem) !important;
        max-width: 100% !important;
        min-height: auto !important;
        box-sizing: border-box !important;
    }
    
    .tarot-title {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.5rem !important;
        text-align: center !important;
    }
    
    .tarot-subtitle {
        font-size: 1rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1rem !important;
        text-align: center !important;
    }
    
    .form-group {
        margin-bottom: 1rem !important;
        width: 100% !important;
    }
    
    .form-input,
    .form-select {
        width: 100% !important;
        padding: 0.8rem !important;
        font-size: 16px !important; /* iOS zoom engellemesi */
        border-radius: 8px !important;
        border: 2px solid #e0e0e0 !important;
        box-sizing: border-box !important;
    }
    
    .form-label {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
        display: block !important;
        color: #1a1a1a !important;
        font-weight: 600 !important;
    }
    
    .tarot-button {
        width: 100% !important;
        padding: 1rem !important;
        font-size: 1.1rem !important;
        margin: 0.5rem 0 !important;
        border-radius: 10px !important;
    }
    
    /* Tarot kartları mobil görünüm */
    .cards-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        width: 100% !important;
    }
    
    .tarot-card {
        width: 100% !important;
        max-width: 280px !important;
        margin: 0 auto !important;
        padding: 1rem !important;
        box-sizing: border-box !important;
    }
    
    .card-image {
        width: 100% !important;
        height: auto !important;
        max-height: 400px !important;
        object-fit: contain !important;
    }
    
    /* Yorumlar mobil görünüm */
    .tarot-interpretation {
        padding: 1rem !important;
        font-size: 15px !important;
        line-height: 1.6 !important;
        margin: 1rem 0 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .tarot-interpretation p {
        margin-bottom: 1rem !important;
        text-align: left !important; /* Mobilde justify yerine left */
    }
    
    /* Loading mobil optimizasyon */
    .tarot-loading {
        padding: 2rem 1rem !important;
        margin: 1rem 0 !important;
    }
    
    .loading-title {
        font-size: 1.3rem !important;
    }
    
    .progress-steps {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .progress-steps .step {
        width: 100% !important;
        text-align: center !important;
        padding: 0.7rem !important;
        font-size: 0.9rem !important;
    }
}

/* Çok küçük ekranlar için (320px ve altı) */
@media screen and (max-width: 360px) {
    .tarot-container {
        margin: 0.25rem !important;
        padding: 0.75rem !important;
        width: calc(100vw - 0.5rem) !important;
    }
    
    .tarot-title {
        font-size: 1.3rem !important;
    }
    
    .form-input,
    .form-select {
        padding: 0.7rem !important;
        font-size: 16px !important;
    }
    
    .tarot-card {
        max-width: 260px !important;
    }
    
    .card-image {
        max-height: 350px !important;
    }
}

/* Landscape mode mobil */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .tarot-container {
        margin: 0.5rem !important;
        padding: 1rem !important;
    }
    
    .tarot-title {
        font-size: 1.4rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .cards-container {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    
    .tarot-card {
        width: calc(50% - 0.5rem) !important;
        max-width: 200px !important;
    }
}

/* Tarot Loading Animasyonları */
.tarot-loading {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f8f9fe 0%, #e8f3ff 100%);
    border-radius: 20px;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(111, 66, 193, 0.15);
}

.loading-content {
    max-width: 500px;
    margin: 0 auto;
}

.loading-animation {
    position: relative;
    margin-bottom: 2rem;
}

.tarot-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e8f3ff;
    border-top: 4px solid #6f42c1;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    margin: 0 auto 1rem;
}

.floating-cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 1rem;
}

.card-symbol {
    font-size: 2rem;
    animation: float 2s ease-in-out infinite;
    display: inline-block;
}

.card-symbol:nth-child(1) {
    animation-delay: 0s;
}

.card-symbol:nth-child(2) {
    animation-delay: 0.5s;
}

.card-symbol:nth-child(3) {
    animation-delay: 1s;
}

.loading-title {
    color: #4a0e4e !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    margin-bottom: 1rem !important;
}

.loading-message {
    color: #666 !important;
    font-size: 1.1rem !important;
    margin-bottom: 2rem !important;
    line-height: 1.6 !important;
}

.progress-steps {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.progress-steps .step {
    padding: 0.8rem 1.5rem;
    background: #f8f9fe;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #999;
    border: 2px solid #e8f3ff;
    transition: all 0.5s ease;
    opacity: 0.5;
}

.progress-steps .step.active {
    background: linear-gradient(135deg, #6f42c1 0%, #8e4ec6 100%);
    color: white;
    border-color: #6f42c1;
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(111, 66, 193, 0.3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Loading mobil responsive */
@media (max-width: 768px) {
    .progress-steps {
        gap: 1rem;
    }
    
    .progress-steps .step {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .loading-title {
        font-size: 1.5rem !important;
    }
    
    .floating-cards {
        gap: 15px;
    }
    
    .card-symbol {
        font-size: 1.5rem;
    }
}
