/* Thurtea-Ai - AI Development Assistant Stylesheet */
/* Main CSS - Foundation: Variables, Base Styles, Typography, Layout */

/* CSS Custom Properties (Variables) */
:root {
    --primary-color: #667eea;
    --primary-dark: #4c63d2;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --error-color: #f56565;
    --info-color: #4299e1;
    --bg-color: #1a202c;
    --card-bg: #2d3748;
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --border-color: #4a5568;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-color) 0%, #edf2f7 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 40px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* Typography Improvements */
.template-gallery,
.documentation {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.template-gallery h2,
.documentation h2,
.template-card h3,
.doc-card h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

.template-card p,
.doc-content {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Validation Styles */
.validation-messages {
    margin-top: 8px;
    padding: 12px;
    border-radius: var(--border-radius);
    font-size: 0.9em;
    animation: slideIn 0.3s ease-out;
}

.validation-messages.error {
    background-color: rgba(245, 101, 101, 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

.validation-messages.suggestions {
    background-color: rgba(66, 153, 225, 0.1);
    border: 1px solid var(--info-color);
    color: var(--info-color);
}

.validation-item {
    display: flex;
    align-items: center;
    margin: 4px 0;
}

.validation-item i {
    margin-right: 8px;
    flex-shrink: 0;
}

.validation-error {
    border-color: var(--error-color) !important;
    box-shadow: 0 0 0 2px rgba(245, 101, 101, 0.2);
}

/* Template Button Active State */
button.template-btn.active,
button[data-template].active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.template-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Enhanced Context Panel */
.context-panel .context-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    margin: 4px 0;
}

.context-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.context-value {
    color: var(--primary-color);
    font-weight: 500;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #000000;
    }
    
    .template-card,
    .doc-card {
        border: 2px solid #000000;
    }
}

/* Main responsive layout */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .header {
        padding: 30px 15px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 30px 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
}

/* Theme Container */
.theme-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

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