/* Modern TechWawes AI Interface Styles */

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

:root {
    /* Primary Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    
    /* Secondary Colors */
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    
    /* Neutral Colors */
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --white: #ffffff;
    --off-white: #f8fafc;
    
    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-dark: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--dark);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(100, 116, 139, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

.nav-brand i {
    color: var(--primary);
    font-size: 1.8rem;
}

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

.nav-link {
    color: var(--gray-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-dark);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(99,102,241,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--gray-light);
    margin-bottom: 2rem;
    line-height: 1.7;
}

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

.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* AI Brain Animation */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.ai-brain {
    position: relative;
    width: 300px;
    height: 300px;
}

.brain-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    animation: pulse 2s infinite;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
}

.memory-nodes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.node {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    animation: orbit 4s linear infinite;
}

.node-1 { top: 20px; left: 50%; animation-delay: 0s; }
.node-2 { top: 50%; right: 20px; animation-delay: 0.7s; }
.node-3 { bottom: 20px; left: 50%; animation-delay: 1.4s; }
.node-4 { top: 50%; left: 20px; animation-delay: 2.1s; }
.node-5 { top: 30px; left: 30px; animation-delay: 2.8s; }
.node-6 { bottom: 30px; right: 30px; animation-delay: 3.5s; }

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes orbit {
    0% { transform: rotate(0deg) translateX(140px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(140px) rotate(-360deg); }
}

/* Features Section */
.features {
    padding: 6rem 0;
    background: var(--dark-light);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--white);
}

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

.feature-card {
    background: var(--dark);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(100, 116, 139, 0.1);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    color: var(--white);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--white);
}

.feature-card p {
    color: var(--gray-light);
    line-height: 1.6;
}

/* Chat Section */
.chat-section {
    padding: 6rem 0;
    background: var(--dark);
}

.chat-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--dark-light);
    border-radius: 1rem;
    border: 1px solid rgba(100, 116, 139, 0.1);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.chat-header {
    padding: 1.5rem;
    background: var(--gradient-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.ai-avatar {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
}

.ai-details h3 {
    color: var(--white);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.status {
    font-size: 0.875rem;
    color: var(--success);
}

.chat-controls {
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 0.5rem;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--dark);
}

.welcome-message {
    text-align: center;
    padding: 2rem;
}

.welcome-content i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.welcome-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--white);
}

.welcome-content p {
    color: var(--gray-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.suggestions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.suggestion-btn {
    padding: 0.5rem 1rem;
    background: var(--dark-light);
    border: 1px solid var(--primary);
    border-radius: 0.5rem;
    color: var(--primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.suggestion-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    animation: slideIn 0.3s ease-out;
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: var(--gradient-primary);
    color: var(--white);
}

.message.assistant .message-avatar {
    background: var(--secondary);
    color: var(--white);
}

.message-content {
    max-width: 70%;
}

.message-bubble {
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    background: var(--dark-light);
    border: 1px solid rgba(100, 116, 139, 0.1);
    position: relative;
}

.message.user .message-bubble {
    background: var(--gradient-primary);
    color: var(--white);
}

.message-text {
    line-height: 1.6;
    word-wrap: break-word;
}

.message-meta {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 0.5rem;
    display: flex;
    gap: 1rem;
}

.memories-used {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.memory-badge {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

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

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--gray);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-10px); opacity: 1; }
}

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

.chat-input-container {
    padding: 1.5rem;
    background: var(--dark-light);
    border-top: 1px solid rgba(100, 116, 139, 0.1);
}

.input-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

#user-input {
    flex: 1;
    background: var(--dark);
    border: 1px solid rgba(100, 116, 139, 0.2);
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--white);
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    max-height: 120px;
    min-height: 44px;
    transition: var(--transition);
}

#user-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#user-input::placeholder {
    color: var(--gray);
}

.send-button {
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 0.75rem;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.send-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-light);
}

.toggle-slider {
    position: relative;
    width: 40px;
    height: 20px;
    background: var(--gray);
    border-radius: 20px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--white);
    border-radius: 50%;
    transition: var(--transition);
}

input[type="checkbox"]:checked + .toggle-slider {
    background: var(--primary);
}

input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* Memory Panel */
.memory-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--dark-light);
    border-left: 1px solid rgba(100, 116, 139, 0.1);
    transition: var(--transition);
    z-index: 1000;
    overflow-y: auto;
}

.memory-panel.active {
    right: 0;
}

.memory-header {
    padding: 1.5rem;
    background: var(--gradient-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.memory-header h3 {
    color: var(--white);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-panel {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: var(--transition);
}

.close-panel:hover {
    background: rgba(255, 255, 255, 0.1);
}

.memory-content {
    padding: 1.5rem;
}

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

.stat {
    text-align: center;
    padding: 1rem;
    background: var(--dark);
    border-radius: 0.75rem;
    border: 1px solid rgba(100, 116, 139, 0.1);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-light);
}

.memory-list {
    margin-bottom: 2rem;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--gray);
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.memory-item {
    background: var(--dark);
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(100, 116, 139, 0.1);
    margin-bottom: 0.75rem;
}

.memory-key {
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.5rem;
    display: block;
}

.memory-value {
    color: var(--gray-light);
    font-size: 0.875rem;
    line-height: 1.5;
}

.memory-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--dark-light);
    border-radius: 1rem;
    width: 100%;
    max-width: 500px;
    border: 1px solid rgba(100, 116, 139, 0.1);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(100, 116, 139, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--white);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-button {
    background: none;
    border: none;
    color: var(--gray-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: var(--transition);
}

.close-button:hover {
    background: var(--dark);
    color: var(--white);
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--dark);
    border: 1px solid rgba(100, 116, 139, 0.2);
    border-radius: 0.5rem;
    padding: 0.75rem;
    color: var(--white);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(100, 116, 139, 0.1);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.modal-footer .btn {
    min-width: 100px;
}

/* About Section */
.about {
    padding: 6rem 0;
    background: var(--dark-light);
}

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

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.about-text p {
    color: var(--gray-light);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.tech-tag {
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.tech-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.diagram-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--dark);
    border-radius: 0.75rem;
    border: 1px solid rgba(100, 116, 139, 0.1);
    min-width: 100px;
}

.diagram-node i {
    font-size: 1.5rem;
    color: var(--primary);
}

.diagram-node span {
    font-size: 0.875rem;
    color: var(--white);
    font-weight: 500;
}

.diagram-arrow {
    font-size: 1.5rem;
    color: var(--primary);
}

/* Footer */
.footer {
    background: var(--dark);
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(100, 116, 139, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
}

.footer-brand i {
    color: var(--primary);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--gray-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(100, 116, 139, 0.1);
    color: var(--gray);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .tech-diagram {
        flex-direction: column;
    }
    
    .diagram-arrow {
        transform: rotate(90deg);
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .memory-panel {
        width: 100%;
        right: -100%;
    }
    
    .chat-container {
        margin: 0 1rem;
    }
    
    .suggestions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background: var(--primary);
    color: var(--white);
}
