/* Sadhu Q&A Service */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap');

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

:root {
    --bg: #000000;
    --text-primary: #00ff88;
    --text-secondary: #00cc66;
    --text-dim: #004422;
    --glow: #00ff88;
    --border: #00cc66;
}

body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: 'IBM Plex Mono', 'Consolas', 'Monaco', monospace;
    font-weight: 400;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Subtle scanlines */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.08),
        rgba(0, 0, 0, 0.08) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 9999;
    opacity: 0.4;
}

.container {
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Header */
header h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    text-align: center;
    color: var(--text-primary);
    text-shadow: 0 0 10px var(--glow);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* Sadhu Image */
.sadhu-image {
    width: 100%;
    max-width: 400px;
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.sadhu-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 2px solid var(--border);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    transition: transform 0.3s ease;
}

.sadhu-image img:hover {
    transform: scale(1.02);
}

/* Question Form */
.question-form {
    width: 100%;
    max-width: 600px;
}

#questionForm {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#questionInput {
    width: 100%;
    padding: 1rem 1.5rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem;
    background: rgba(0, 255, 136, 0.05);
    border: 2px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
}

#questionInput::placeholder {
    color: var(--text-dim);
}

#questionInput:focus {
    border-color: var(--glow);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
    background: rgba(0, 255, 136, 0.08);
}

#questionInput:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#submitBtn {
    padding: 1rem 2rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem;
    font-weight: 600;
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
}

#submitBtn:hover:not(:disabled) {
    background: rgba(0, 255, 136, 0.2);
    border-color: var(--glow);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    transform: translateY(-2px);
}

#submitBtn:active:not(:disabled) {
    transform: translateY(0);
}

#submitBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading Indicator */
.loading {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    animation: pulse 1.5s ease-in-out infinite;
    margin: 1rem 0;
}

.loading.hidden {
    display: none;
}

/* Answer Area */
.answer-area {
    width: 100%;
    max-width: 600px;
    margin-top: 1rem;
    padding: 2rem;
    background: rgba(0, 255, 136, 0.05);
    border: 2px solid var(--border);
    border-radius: 8px;
    animation: fadeIn 0.5s ease;
}

.answer-area.hidden {
    display: none;
}

.answer-label {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.answer-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.3);
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

/* Responsive */
@media (max-width: 768px) {
    .container {
        gap: 1.5rem;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .sadhu-image {
        max-width: 300px;
    }

    #questionInput,
    #submitBtn {
        font-size: 0.95rem;
        padding: 0.875rem 1.25rem;
    }

    .answer-area {
        padding: 1.5rem;
    }

    .answer-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem 0.75rem;
    }

    .sadhu-image {
        max-width: 250px;
    }

    #questionInput,
    #submitBtn {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }

    .answer-area {
        padding: 1.25rem;
    }
}
