/*
 * wisнblower - Main App Component CSS
 * Starfield Background, Message Section, Input System, SVG Animations
 */

/* ===== STARFIELD BACKGROUND SYSTEM ===== */
.background-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -97;
    display: block;
    pointer-events: none;
}

/* ===== SVG ANIMATIONEN ===== */
@keyframes twinkle {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

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

@keyframes shooting-star {
    0% { 
        transform: translateX(0) translateY(0);
        opacity: 0; 
    }
    10% { 
        opacity: 1; 
    }
    50% { 
        opacity: 1; 
    }
    70% { 
        opacity: 0.6; 
    }
    85% { 
        opacity: 0.2; 
    }
    100% { 
        transform: translateX(300px) translateY(300px);
        opacity: 0; 
    }
}

.star-small {
    animation: twinkle 4s infinite;
    animation-delay: calc(var(--delay) * 1s);
}

.star-medium {
    animation: twinkle 5s infinite;
    animation-delay: calc(var(--delay) * 1s);
}

.star-large {
    animation: twinkle 6s infinite;
    animation-delay: calc(var(--delay) * 1s);
}

.seed {
    animation: float 15s infinite ease-in-out;
    animation-delay: calc(var(--delay) * 1s);
}

.shooting-star {
    animation: shooting-star 12s infinite linear;
    animation-delay: calc(var(--delay) * 12s);
}

.shooting-star:nth-child(1) {
    animation-delay: 3s;
    animation-duration: 10s;
}

.shooting-star:nth-child(2) {
    animation-delay: 18s;
    animation-duration: 14s;
}

.shooting-star:nth-child(3) {
    animation-delay: 35s;
    animation-duration: 11s;
}

/* ===== MESSAGE SECTION ===== */
.message-section {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 860px;
    min-height: 350px;
    position: relative;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

/* ===== INPUT AREA SYSTEM ===== */
.input-area {
    position: relative;
    margin-bottom: 1.5rem;
    transition: opacity 0.4s ease;
    width: 100%;
}

textarea {
    width: 100%;
    min-height: 120px;
    max-height: 250px;
    padding: 1.2rem;
    padding-top: 3rem;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    resize: none;
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    color: white;
}

textarea::placeholder {
    color: rgba(255, 255, 255, 0.85);
}

textarea:focus {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
    border-color: #9c27b0;
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.15);
    background-color: rgba(255, 255, 255, 0.25);
}

/* ===== LISTENING ANIMATION ===== */
#listeningAnimation {
    position: absolute;
    left: 1.2rem;
    top: 1.2rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.95rem;
    font-style: italic;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

/* ===== SUBMIT BUTTONS SYSTEM ===== */
.submit-buttons {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-top: 25px;
    margin-bottom: 10px;
    transition: opacity 0.4s ease;
    width: 100%;
}

.btn {
    border: none;
    padding: 12px 14px;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    flex: 1;
    min-width: 200px;
    color: white;
    text-align: center;
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-universe {
    background-color: #9c27b0;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3);
}

.btn-universe:hover {
    background-color: #8e24aa;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.4);
}

.btn-forget {
    background-color: #3498db;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-forget:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn:focus {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.btn-universe:disabled, .btn-forget:disabled {
    background-color: rgba(156, 39, 176, 0.4);
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

.btn-forget:disabled {
    background-color: rgba(52, 152, 219, 0.4);
}

.btn-universe:disabled:hover, .btn-forget:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* ===== SUCCESS MESSAGE ===== */
.success-message {
    padding: 1rem;
    background-color: #2ecc71;
    color: white;
    border-radius: 4px;
    display: none;
    text-align: center;
    z-index: 200;
    position: absolute;
    left: 50%;
    top: calc(100% - 160px);
    transform: translateX(-50%);
    min-width: 80%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 0;
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* ===== STATISTICS SYSTEM ===== */
.stats-container {
    padding: 15px 0;
    text-align: center;
    margin-top: 10px;
}

.stats-text {
    display: inline-block;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.stats-number {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin-right: 3px;
}

/* ===== SCREEN READER SUPPORT ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-announcement {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    animation: sr-only-announcement 0.01s;
}

@keyframes sr-only-announcement {
    0% { opacity: 0; }
    100% { opacity: 0; }
}

/* ===== RESPONSIVE WISHBLOWER ===== */
@media (max-width: 900px) {
    .content-section, .message-section {
        width: 90%;
    }
}

@media (max-width: 768px) {
    .content-section, .message-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        width: 98%;
    }
    
    .message-section {
        min-height: 350px;
    }
    
    .stats-container {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .submit-buttons {
        flex-direction: column;
    }
    
    .success-message {
        min-width: 85%;
        top: calc(100% - 170px);
    }
    
    textarea {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 14px 14px;
        font-size: 1.1rem;
    }
}

/* ===== ACCESSIBILITY OVERRIDES ===== */
@media (forced-colors: active) {
    .btn-universe, .btn-forget {
        border: 2px solid transparent;
    }
    
    .btn-universe:disabled, .btn-forget:disabled {
        opacity: 0.5;
    }
}

@media (prefers-reduced-motion: reduce) {
    .star-small, .star-medium, .star-large, .seed, .shooting-star {
        animation: none;
    }
    
    .btn:hover {
        transform: none;
    }
}