/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1e293b;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 2rem 0;
}

.hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.logo h1 {
    font-size: 1.5rem;
    margin: 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.feature-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.feature-text h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.feature-text p {
    opacity: 0.8;
    margin: 0;
    font-size: 0.9rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Chat Preview */
.hero-visual {
    display: flex;
    justify-content: center;
}

.chat-preview {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 1rem;
    padding: 1.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.chat-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.chat-info h4 {
    margin: 0;
    font-size: 1rem;
}

.status {
    font-size: 0.8rem;
    opacity: 0.7;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    max-width: 85%;
}

.user-message {
    background: rgba(255, 255, 255, 0.2);
    align-self: flex-end;
    color: white;
}

.bot-message {
    background: rgba(255, 255, 255, 0.9);
    color: #1e293b;
    align-self: flex-start;
}

.typing-indicator {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.feedback-preview {
    font-size: 0.9rem;
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.score {
    color: #16a34a;
}

.model {
    color: #64748b;
    font-size: 0.8rem;
}

/* Features Section */
.features-section {
    padding: 6rem 0;
    background: #f8fafc;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #1e293b;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon-large {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: #1e293b;
}

.feature-card p {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* Commands Section */
.commands-section {
    padding: 6rem 0;
    background: white;
}

.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.command-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border-left: 4px solid #667eea;
}

.command-card h3 {
    color: #667eea;
    font-family: 'Monaco', 'Menlo', monospace;
    margin-bottom: 0.5rem;
}

.command-desc {
    color: #64748b;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.command-example {
    background: #1e293b;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

.command-example code {
    color: #e2e8f0;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.8rem;
    word-break: break-all;
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.cta-actions {
    margin-bottom: 3rem;
}

.cta-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    width: 40px;
    height: 40px;
}

.footer-brand h3 {
    margin: 0;
    color: #667eea;
}

.footer-brand p {
    opacity: 0.8;
    margin: 0;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    margin-bottom: 1rem;
    color: #667eea;
}

.footer-column a {
    display: block;
    color: #e2e8f0;
    text-decoration: none;
    margin-bottom: 0.5rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.footer-column a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #334155;
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .commands-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Dashboard specific styles */
.dashboard-container {
    min-height: 100vh;
    background: #f8fafc;
}

.dashboard-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
}

.dashboard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.dashboard-main {
    padding: 2rem 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e293b;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
}

/* Loading states */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dashboard Specific Styles */
.navbar {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.mascot {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
}

.subtitle {
    color: #64748b;
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.stat-content p {
    color: #64748b;
    margin: 0;
    font-size: 0.9rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.recent-feedback, .analytics {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.recent-feedback h3, .analytics h3 {
    margin-bottom: 1rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feedback-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feedback-item {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border-left: 4px solid #667eea;
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.feedback-date {
    color: #64748b;
    font-size: 0.9rem;
}

.feedback-score {
    color: #16a34a;
    font-weight: 600;
}

.feedback-prompt {
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.feedback-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
}

.feedback-link:hover {
    text-decoration: underline;
}

.quick-actions {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.quick-actions h3 {
    margin-bottom: 1rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.loading-container, .error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.no-data {
    text-align: center;
    color: #64748b;
    font-style: italic;
    padding: 2rem;
}

.analytics-content {
    color: #64748b;
}

.analytics-summary p {
    margin-bottom: 0.5rem;
}

/* Feedback Detail Page */
.feedback-detail {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.feedback-container {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.feedback-meta h1 {
    margin: 0 0 1rem 0;
}

.meta-info {
    display: flex;
    gap: 2rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.feedback-score {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.score-circle.excellent { background: rgba(16, 185, 129, 0.2); }
.score-circle.great { background: rgba(245, 158, 11, 0.2); }
.score-circle.good { background: rgba(139, 92, 246, 0.2); }
.score-circle.okay { background: rgba(249, 115, 22, 0.2); }
.score-circle.needs-work { background: rgba(239, 68, 68, 0.2); }

.score-emoji {
    font-size: 2rem;
}

.original-prompt, .ai-feedback, .feedback-analysis {
    padding: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.original-prompt h2, .ai-feedback h2, .feedback-analysis h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.prompt-content {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.prompt-text, .feedback-text {
    line-height: 1.7;
    margin-bottom: 1rem;
}

.prompt-stats {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
}

.feedback-content {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.analysis-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.analysis-card h3 {
    margin-bottom: 1rem;
    color: #1e293b;
}

.score-factor {
    margin-bottom: 1rem;
}

.score-factor span {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #64748b;
}

.score-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
}

.suggestion {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #64748b;
}

.suggestion i {
    color: #f59e0b;
}

.actions {
    padding: 2rem;
}

.btn-success {
    background: #16a34a;
    color: white;
}

.btn-success:hover {
    background: #15803d;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .content-grid, .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .feedback-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .meta-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}