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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header h1 {
    color: #4a5568;
    font-size: 1.8rem;
    font-weight: 600;
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
}

.language-switcher label {
    font-weight: 500;
    color: #4a5568;
}

.language-dropdown {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-dropdown:hover {
    border-color: #667eea;
}

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

/* Main Content */
.main-content {
    padding: 2rem 0;
}

/* Welcome Section */
.welcome-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.welcome-section h2 {
    color: #2d3748;
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-section p {
    color: #4a5568;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Reflection Form */
.reflection-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.question-block {
    margin-bottom: 2rem;
}

.question-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2d3748;
    font-size: 1.1rem;
}

.question-number {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    margin-right: 10px;
    font-size: 1rem;
}

.answer-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

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

.answer-textarea::placeholder {
    color: #a0aec0;
    font-style: italic;
}

/* Additional Information */
.additional-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
}

.additional-info h3 {
    color: #4a5568;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Submit Section */
.submit-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.submit-button, .draft-button, .clear-button, .edit-button {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.submit-button {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.3);
}

.draft-button {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
}

.draft-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(237, 137, 54, 0.3);
}

.clear-button {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.clear-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 101, 101, 0.3);
}

.edit-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.edit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Response Display */
.response-display {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.response-display h3 {
    color: #38a169;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.response-display p {
    color: #4a5568;
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem 0;
    text-align: center;
    color: #4a5568;
}

.footer p {
    margin-bottom: 0.5rem;
}

.current-language {
    font-weight: 600;
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .welcome-section h2 {
        font-size: 1.5rem;
    }
    
    .welcome-section p {
        font-size: 1rem;
    }
    
    .submit-section {
        flex-direction: column;
        align-items: center;
    }
    
    .submit-button, .draft-button, .clear-button, .edit-button {
        width: 100%;
        max-width: 250px;
    }
}

/* ===== MESSAGE CARD STYLES ===== */
.message-card {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.message-card.show {
    opacity: 1;
    visibility: visible;
}

.message-card.hidden {
    display: none;
}

.message-card-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.message-card.show .message-card-content {
    transform: scale(1) translateY(0);
}

.message-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.message-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
}

.message-card.success .message-icon {
    background: #10b981;
    color: white;
}

.message-card.error .message-icon {
    background: #ef4444;
    color: white;
}

.message-card.info .message-icon {
    background: #3b82f6;
    color: white;
}

.message-card-close {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.message-card-close:hover {
    background: #f1f5f9;
    color: #334155;
}

.message-card-body {
    padding: 0 24px 24px;
}

.message-card-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #1e293b;
}

.message-card.success .message-card-title {
    color: #059669;
}

.message-card.error .message-card-title {
    color: #dc2626;
}

.message-card.info .message-card-title {
    color: #2563eb;
}

.message-card-text {
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 20px 0;
    font-size: 16px;
}

.message-card-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.message-card-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 120px;
}

.message-card-btn.primary {
    background: #3b82f6;
    color: white;
}

.message-card-btn.primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.message-card-btn.secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.message-card-btn.secondary:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.message-card-btn.danger {
    background: #ef4444;
    color: white;
}

.message-card-btn.danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 640px) {
    .message-card-content {
        width: 95%;
        margin: 20px;
    }
    
    .message-card-header {
        padding: 16px 20px 12px;
    }
    
    .message-card-body {
        padding: 0 20px 20px;
    }
    
    .message-card-title {
        font-size: 18px;
    }
    
    .message-card-text {
        font-size: 14px;
    }
    
    .message-card-actions {
        flex-direction: column;
    }
    
    .message-card-btn {
        min-width: auto;
    }
}

/* ===== ANIMATION ENHANCEMENT ===== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message-card.show .message-card-content {
    animation: slideInUp 0.3s ease-out;
}

/* Animation for smooth transitions */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Form validation styles */
.answer-textarea:invalid {
    border-color: #f56565;
}

.answer-textarea:valid {
    border-color: #48bb78;
}

/* Loading state */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}