/* Cosmic Tree of Life Form Styling - Universal Data Entry Enhancement */

:root {
    --cosmic-purple: #9b5de5;
    --cosmic-blue: #673ab7;
    --sage-green: #5cdb95;
    --deep-space: #151530;
    --star-light: #f0f8ff;
    --golden: #ffcc02;
    --tree-overlay: rgba(21, 21, 48, 0.4);
    --cosmic-glow: rgba(92, 219, 149, 0.3);
}

/* Universal Tree of Life Background for Forms */
.cosmic-form-container, 
.form-container,
.card,
.journal-entry-form,
.meditation-form,
.reflection-form {
    background: url('/static/images/cosmic-meditation-silhouette.png') center/cover no-repeat,
               rgba(92, 219, 149, 0.15);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    border: 2px solid rgba(155, 93, 229, 0.3);
    box-shadow: 0 8px 32px var(--cosmic-glow);
    position: relative;
    overflow: hidden;
}

.cosmic-form-container::before,
.form-container::before,
.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 204, 2, 0.05) 0%, transparent 70%);
    animation: cosmicPulse 6s ease-in-out infinite;
    z-index: 1;
}

/* Cosmic Input Field Styling */
.cosmic-input,
.form-control,
textarea,
select,
input[type="text"],
input[type="email"],
input[type="password"] {
    background: rgba(21, 21, 48, 0.8);
    border: 2px solid rgba(255, 204, 2, 0.4);
    border-radius: 15px;
    color: var(--star-light);
    padding: 12px 16px;
    font-size: 16px;
    backdrop-filter: blur(5px);
    box-shadow: inset 0 2px 10px rgba(92, 219, 149, 0.1);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.cosmic-input:focus,
.form-control:focus,
textarea:focus,
select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: rgba(92, 219, 149, 0.8);
    box-shadow: 0 0 20px var(--cosmic-glow), inset 0 2px 10px rgba(92, 219, 149, 0.2);
    background: rgba(21, 21, 48, 0.9);
}

/* Cosmic Button Styling */
.cosmic-button,
.btn-cosmic,
.submit-button,
.btn-primary {
    background: linear-gradient(135deg, var(--sage-green), var(--cosmic-purple));
    border: 2px solid rgba(255, 204, 2, 0.5);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--cosmic-glow);
    position: relative;
    z-index: 2;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.cosmic-button:hover,
.btn-cosmic:hover,
.submit-button:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(92, 219, 149, 0.5);
    border-color: rgba(255, 204, 2, 0.8);
    color: white;
    text-decoration: none;
}

/* Form Labels with Cosmic Styling */
.cosmic-label,
.form-label,
label {
    color: var(--sage-green);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    position: relative;
    z-index: 2;
}

/* Cosmic Animations */
@keyframes cosmicPulse {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
        opacity: 0.1; 
    }
    50% { 
        transform: scale(1.2) rotate(180deg); 
        opacity: 0.3; 
    }
}

@keyframes treeGlow {
    0%, 100% { 
        box-shadow: 0 8px 32px rgba(92, 219, 149, 0.2);
    }
    50% { 
        box-shadow: 0 12px 48px rgba(255, 204, 2, 0.3);
    }
}

/* Tree of Life Page Background Enhancement */
.tree-background {
    background: url('/static/images/cosmic-meditation-silhouette.png') center/cover no-repeat,
               linear-gradient(135deg, #151530 0%, #2d1b69 50%, #151530 100%);
    position: relative;
    min-height: 100vh;
}

.tree-background::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--tree-overlay);
    z-index: 0;
    pointer-events: none;
}

/* Content Positioning Over Tree */
.tree-content {
    position: relative;
    z-index: 1;
    padding: 1rem;
}

/* Enhanced Card Styling for Tree Background */
.cosmic-card {
    background: rgba(92, 219, 149, 0.15);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    border: 2px solid rgba(155, 93, 229, 0.3);
    box-shadow: 0 8px 32px var(--cosmic-glow);
    padding: 1.5rem;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
    animation: treeGlow 4s ease-in-out infinite;
}

/* Journal Entry Specific Styling */
.journal-entry {
    background: rgba(21, 21, 48, 0.7);
    border: 2px solid rgba(255, 204, 2, 0.4);
    border-radius: 20px;
    padding: 1.5rem;
    margin: 1rem 0;
    backdrop-filter: blur(15px);
    position: relative;
    z-index: 2;
    box-shadow: 0 8px 32px rgba(92, 219, 149, 0.2);
}

/* Wisdom Response Blocks */
.wisdom-response,
.sage-response,
.meditation-prompt {
    background: rgba(92, 219, 149, 0.12);
    border: 1px solid rgba(255, 204, 2, 0.3);
    border-radius: 18px;
    padding: 1.2rem;
    margin: 1rem 0;
    backdrop-filter: blur(12px);
    box-shadow: inset 0 2px 8px rgba(155, 93, 229, 0.1);
}

/* Reflection Prompts */
.reflection-prompt,
.daily-prompt,
.spiritual-guidance {
    background: rgba(155, 93, 229, 0.15);
    border-left: 4px solid var(--golden);
    border-radius: 12px;
    padding: 1rem;
    margin: 0.8rem 0;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(92, 219, 149, 0.15);
}

.journal-title {
    color: var(--golden);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.journal-date {
    color: var(--sage-green);
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

/* Meditation Timer Cosmic Styling */
.meditation-timer {
    background: radial-gradient(circle, rgba(92, 219, 149, 0.2) 0%, rgba(155, 93, 229, 0.1) 100%);
    border: 3px solid rgba(255, 204, 2, 0.4);
    border-radius: 50%;
    padding: 2rem;
    text-align: center;
    animation: cosmicPulse 3s ease-in-out infinite;
}

/* Mobile Responsive Enhancements */
@media (max-width: 768px) {
    .cosmic-form-container,
    .form-container,
    .card {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .cosmic-input,
    .form-control,
    textarea,
    select {
        font-size: 16px; /* Prevent mobile zoom */
    }
    
    .cosmic-button,
    .btn-cosmic,
    .submit-button {
        width: 100%;
        min-height: 48px; /* Touch-friendly */
    }
}

/* Placeholder Text Styling */
.cosmic-input::placeholder,
.form-control::placeholder,
textarea::placeholder {
    color: rgba(240, 248, 255, 0.6);
    font-style: italic;
}

/* Error State Styling */
.cosmic-input.error,
.form-control.error {
    border-color: rgba(255, 99, 132, 0.8);
    box-shadow: 0 0 15px rgba(255, 99, 132, 0.3);
}

/* Success State Styling */
.cosmic-input.success,
.form-control.success {
    border-color: rgba(92, 219, 149, 0.8);
    box-shadow: 0 0 15px rgba(92, 219, 149, 0.4);
}

/* Navigation and Menu Transparency */
.navbar,
.menu-overlay,
.navigation-container {
    background: rgba(21, 21, 48, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 204, 2, 0.2);
}

/* Response Display Areas */
.response-container,
.wisdom-display,
.ai-response {
    background: rgba(92, 219, 149, 0.08);
    border: 1px solid rgba(155, 93, 229, 0.25);
    border-radius: 20px;
    padding: 1.5rem;
    margin: 1rem 0;
    backdrop-filter: blur(18px);
    box-shadow: 0 6px 24px rgba(92, 219, 149, 0.12);
}

/* Quote and Wisdom Text Blocks */
.quote-block,
.wisdom-quote,
.spiritual-insight {
    background: rgba(255, 204, 2, 0.08);
    border-left: 3px solid var(--golden);
    border-radius: 0 15px 15px 0;
    padding: 1rem 1.5rem;
    margin: 0.8rem 0;
    backdrop-filter: blur(10px);
    font-style: italic;
    box-shadow: inset 0 1px 6px rgba(92, 219, 149, 0.1);
}

/* Cosmic Progress Indicators */
.cosmic-progress {
    background: rgba(21, 21, 48, 0.6);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 204, 2, 0.3);
    backdrop-filter: blur(8px);
}

.cosmic-progress-bar {
    background: linear-gradient(90deg, var(--sage-green), var(--cosmic-purple));
    height: 8px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(92, 219, 149, 0.5);
}

/* Enhanced Text Content Areas */
.content-block,
.text-content,
.description-text {
    background: rgba(155, 93, 229, 0.06);
    border-radius: 12px;
    padding: 1rem;
    margin: 0.5rem 0;
    backdrop-filter: blur(6px);
    line-height: 1.6;
}

/* Modal and Overlay Transparency */
.modal-content,
.overlay-panel,
.popup-container {
    background: rgba(21, 21, 48, 0.9);
    backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 204, 2, 0.4);
    border-radius: 25px;
    box-shadow: 0 12px 48px rgba(92, 219, 149, 0.2);
}