/* ========================================
   Gefühle-Wortwolke - Stylesheet
   Freundliches Design passend zum Blob-Stil
   ======================================== */

:root {
    --primary-color: #87CEEB;      /* Hellblau wie der Blob */
    --secondary-color: #FFB6C1;    /* Sanftes Rosa */
    --accent-color: #98D8C8;       /* Mintgrün */
    --text-color: #4A5568;         /* Sanftes Dunkelgrau */
    --bg-color: #F7FAFC;           /* Sehr helles Grau */
    --card-bg: #FFFFFF;
    --shadow: 0 4px 20px rgba(135, 206, 235, 0.3);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Nunito', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-color) 0%, #E8F4FD 50%, #FFF5F7 100%);
    min-height: 100vh;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #A8D8EA 100%);
    color: white;
    box-shadow: var(--shadow);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Container */
.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: calc(100vh - 200px);
}

/* Wortwolke Container */
.word-cloud-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    min-height: 500px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 30px;
}

/* Einzelne Wörter in der Wolke */
.word-item {
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    background: var(--card-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 2px solid transparent;
}

.word-item:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 6px 20px rgba(135, 206, 235, 0.4);
    border-color: var(--primary-color);
}

/* Verschiedene Größen für Wortwolke-Effekt */
.word-size-1 { font-size: 0.85rem; }
.word-size-2 { font-size: 1rem; }
.word-size-3 { font-size: 1.15rem; }
.word-size-4 { font-size: 1.3rem; }
.word-size-5 { font-size: 1.5rem; }

/* Verschiedene Farben */
.word-color-1 { color: #5B9BD5; background: linear-gradient(135deg, #E8F4FD 0%, #D4EDFC 100%); }
.word-color-2 { color: #E57373; background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%); }
.word-color-3 { color: #81C784; background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%); }
.word-color-4 { color: #FFB74D; background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%); }
.word-color-5 { color: #BA68C8; background: linear-gradient(135deg, #F3E5F5 0%, #E1BEE7 100%); }
.word-color-6 { color: #4DD0E1; background: linear-gradient(135deg, #E0F7FA 0%, #B2EBF2 100%); }

/* Aktiver Zustand - Bild wird angezeigt */
.emotion-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
}

.emotion-image-container {
    position: relative;
    margin: 20px 0;
    cursor: pointer;
    transition: var(--transition);
}

.emotion-image-container:hover {
    transform: scale(1.02);
}

.emotion-image {
    max-width: 350px;
    max-height: 350px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(135, 206, 235, 0.4);
    background: white;
    padding: 10px;
}

.emotion-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-transform: capitalize;
}

.download-hint {
    font-size: 0.9rem;
    color: #888;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.download-hint svg {
    width: 16px;
    height: 16px;
}

/* Quellenhinweis */
.source-hint {
    margin-top: 20px;
    padding: 15px 25px;
    background: linear-gradient(135deg, #F0F9FF 0%, #E8F4FD 100%);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    font-size: 0.85rem;
    color: #5A6A7A;
    max-width: 500px;
    text-align: left;
    line-height: 1.6;
}

.source-hint strong {
    color: var(--text-color);
    display: block;
    margin-bottom: 5px;
}

/* Karten-Download Bereich */
.card-download-section {
    margin-top: 25px;
    text-align: center;
}

.card-download-title {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 12px;
    font-weight: 600;
}

.card-download-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.card-download-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #A8D8EA 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(135, 206, 235, 0.4);
    transition: var(--transition);
}

.card-download-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(135, 206, 235, 0.5);
}

.card-download-pdf {
    background: linear-gradient(135deg, #E74C3C 0%, #C0392B 100%);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.card-download-pdf:hover {
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
}

.card-download-button svg {
    flex-shrink: 0;
}

/* Schwebende Wortwolke um das Bild */
.floating-words {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 800px;
    margin-top: 30px;
}

.floating-word {
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.9rem;
    background: var(--card-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    animation: float 3s ease-in-out infinite;
}

.floating-word:nth-child(odd) {
    animation-delay: -1.5s;
}

.floating-word:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(135, 206, 235, 0.4);
}

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

/* Zurück-Button */
.back-button {
    position: fixed;
    top: 100px;
    left: 20px;
    padding: 12px 24px;
    background: var(--card-bg);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 100;
}

.back-button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(-5px);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #4A5568 0%, #2D3748 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
}

.footer-link {
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    transition: var(--transition);
    cursor: pointer;
}

.footer-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.footer-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(135, 206, 235, 0.3);
    border: 1px solid rgba(255,255,255,0.3);
}

.footer-download:hover {
    background: rgba(135, 206, 235, 0.5);
}

.footer-copyright {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Modal / PopUp */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #888;
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-color);
    transform: rotate(90deg);
}

.modal-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #E8F4FD;
}

.modal-body {
    line-height: 1.8;
    color: var(--text-color);
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body a {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .word-cloud-container {
        padding: 15px;
        min-height: 400px;
    }
    
    .word-item {
        padding: 6px 12px;
    }
    
    .emotion-image {
        max-width: 280px;
        max-height: 280px;
    }
    
    .back-button {
        top: auto;
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .back-button:hover {
        transform: translateX(-50%) scale(1.05);
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-content {
        padding: 25px;
    }
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loading-blob {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: bounce 0.6s infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0) scale(1); }
    to { transform: translateY(-20px) scale(0.9); }
}
