/* Rüya Yorumlayıcı Eklentisi CSS */

/* Ana buton stilleri */
#dream-interpreter-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    color: white;
    border: none;
    border-radius: 60px;
    padding: 18px 28px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    user-select: none;
    max-width: 220px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#dream-interpreter-button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    background: linear-gradient(135deg, #5b5ff1 0%, #7c3aed 50%, #db2777 100%);
}

#dream-interpreter-button:active {
    transform: translateY(-1px);
}

/* Online indicator styles */
.online-indicator {
    position: relative;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.online-dot {
    width: 12px;
    height: 12px;
    background: #10b981;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.online-pulse {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
    opacity: 0.6;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.8);
        opacity: 0.2;
    }
    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

#dream-interpreter-button span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modal overlay */
.dream-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.1) 0%, rgba(0, 0, 0, 0.7) 100%);
    backdrop-filter: blur(8px);
    animation: dreamFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dream-modal.dream-modal-show {
    animation: dreamFadeIn 0.3s ease;
}

/* Modal içerik */
.dream-modal-content {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    margin: 3% auto;
    border-radius: 24px;
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    animation: dreamSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Modal header */
.dream-modal-header {
    padding: 28px 35px 24px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    color: white;
    border-radius: 24px 24px 0 0;
    position: relative;
    overflow: hidden;
}

.modal-title-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-online-icon {
    flex-shrink: 0;
    opacity: 0.9;
}

.dream-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: dreamShimmer 3s infinite;
}

@keyframes dreamShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.dream-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.dream-close {
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10001;
    pointer-events: auto;
    position: relative;
}

.dream-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Modal body */
.dream-modal-body {
    padding: 30px;
}

/* Dil seçici */
.dream-language-selector {
    margin-bottom: 20px;
}

.dream-language-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.dream-language-selector select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    background-color: white;
    transition: all 0.3s ease;
    font-family: inherit;
}

.dream-language-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Karşılama mesajı */
.dream-greeting {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
    color: #333;
    border-left: 4px solid #667eea;
    display: none;
}

/* Textarea container */
.dream-textarea-container {
    margin-bottom: 25px;
}

.dream-textarea-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.dream-textarea-container textarea {
    width: 100%;
    min-height: 120px;
    max-height: 300px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.dream-textarea-container textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.dream-textarea-container textarea::placeholder {
    color: #adb5bd;
}

/* Yorumlama butonu */
.dream-interpret-button {
    width: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    color: white;
    border: none;
    padding: 18px 28px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    margin-bottom: 24px;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.dream-interpret-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.dream-interpret-button:hover::before {
    left: 100%;
}

.dream-interpret-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.dream-interpret-button:active:not(:disabled) {
    transform: translateY(0);
}

.dream-interpret-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Sonuç alanı */
.dream-result {
    display: none;
    margin-top: 20px;
}

.dream-response {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8ff 100%);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #28a745;
    line-height: 1.6;
    color: #333;
}

.dream-error {
    background: linear-gradient(135deg, #ffe6e6 0%, #fff0f0 100%);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #dc3545;
    line-height: 1.6;
    color: #721c24;
}

.dream-response strong,
.dream-error strong {
    color: inherit;
    font-weight: 700;
}

/* Body scroll kilidi */
body.dream-modal-open {
    overflow: hidden;
}

/* Animasyonlar */
@keyframes dreamFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes dreamSlideIn {
    from {
        opacity: 0;
        transform: translateY(-60px) scale(0.85) rotateX(10deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

/* Yeni animasyonlar */
@keyframes dreamPulse {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 15px 40px rgba(99, 102, 241, 0.6);
    }
}

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

#dream-interpreter-button {
    animation: dreamFloat 4s ease-in-out infinite;
}

#dream-interpreter-button:hover {
    animation: dreamPulse 2s ease-in-out infinite;
}

/* Responsive tasarım */
@media (max-width: 768px) {
    #dream-interpreter-button {
        bottom: 25px;
        right: 20px;
        padding: 16px 24px;
        font-size: 14px;
        max-width: 200px;
        min-width: 160px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    #dream-interpreter-button span {
        display: inline-block;
        font-weight: 600;
        letter-spacing: 0.5px;
    }
    
    #dream-interpreter-button svg {
        width: 20px;
        height: 20px;
    }
    
    .dream-modal-content {
        width: 95%;
        margin: 2% auto;
        max-height: 90vh;
    }
    
    .dream-modal-header {
        padding: 20px 25px 15px;
    }
    
    .dream-modal-header h2 {
        font-size: 20px;
    }
    
    .dream-modal-body {
        padding: 20px 25px;
    }
    
    .dream-close {
        font-size: 28px;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    #dream-interpreter-button {
        bottom: 20px;
        right: 15px;
        padding: 14px 18px;
        font-size: 12px;
        max-width: 250px;
        min-width: 200px;
        border-radius: 50px;
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
    }
    
    #dream-interpreter-button span {
        display: inline-block !important;
        font-weight: 600;
        letter-spacing: 0.3px;
        margin-left: 8px;
    }
    
    #dream-interpreter-button svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }
    
    .dream-modal-content {
        width: 98%;
        margin: 1% auto;
        border-radius: 16px;
    }
    
    .dream-modal-header {
        padding: 18px 20px 14px;
        border-radius: 16px 16px 0 0;
    }
    
    .dream-modal-header h2 {
        font-size: 18px;
    }
    
    .dream-modal-body {
        padding: 18px 20px;
    }
    
    .dream-textarea-container textarea {
        min-height: 100px;
        font-size: 14px;
    }
    
    .dream-interpret-button {
        font-size: 14px;
        padding: 12px 20px;
    }
}

/* Yükleme animasyonu */
.dream-interpret-button:disabled::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: dreamSpin 1s linear infinite;
}

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

/* Scroll bar özelleştirme */
.dream-modal-content::-webkit-scrollbar {
    width: 8px;
}

.dream-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.dream-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.dream-modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}