/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --darker: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
    color: var(--light);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    line-height: 1.6;
}

/* ===== APP CONTAINER ===== */
.app-container {
    width: 100%;
    max-width: 900px;
    height: 95vh;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.8s ease;
}

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

/* ===== STATUS BANNER ===== */
.status-banner {
    padding: 12px 30px;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.status-banner.live {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1), transparent);
    border-bottom-color: rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.status-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-tag {
    background: var(--success);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ===== HEADER ===== */
.header {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo i {
    font-size: 1.8rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.badges {
    display: flex;
    gap: 8px;
}

.tech-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tech-badge.html {
    background: rgba(227, 79, 38, 0.2);
    color: #e34f26;
    border: 1px solid rgba(227, 79, 38, 0.3);
}

.tech-badge.css {
    background: rgba(21, 114, 182, 0.2);
    color: #1572b6;
    border: 1px solid rgba(21, 114, 182, 0.3);
}

.tech-badge.js {
    background: rgba(247, 223, 30, 0.2);
    color: #f7df1e;
    border: 1px solid rgba(247, 223, 30, 0.3);
}

.header-actions {
    display: flex;
    gap: 10px;
}

.header-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--light);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.welcome-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker);
    padding: 40px;
    overflow-y: auto;
    transition: opacity 0.5s ease;
}

.welcome-section:not(.active) {
    opacity: 0;
    pointer-events: none;
}

.welcome-card {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.welcome-icon {
    font-size: 5rem;
    margin-bottom: 25px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.welcome-card h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #fff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-desc {
    color: var(--gray);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

/* ===== FEATURES GRID ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 40px 0;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.feature-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--light);
}

.feature-card p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* ===== PROMPTS SECTION ===== */
.prompts-section {
    margin: 40px 0;
}

.prompts-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--light);
}

.prompts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.prompt-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--light);
    font-size: 0.95rem;
    text-align: left;
}

.prompt-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.prompt-btn i {
    font-size: 1.2rem;
    color: var(--primary);
}

/* ===== START CHAT ===== */
.start-chat {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), transparent);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    padding: 30px;
    margin-top: 40px;
}

.start-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    width: 100%;
    padding: 20px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.chat-note {
    color: var(--gray);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

/* ===== CHAT SECTION ===== */
.chat-section {
    height: 100%;
    padding: 25px;
    overflow-y: auto;
}

.messages-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.message {
    display: flex;
    gap: 15px;
    animation: messageSlide 0.4s ease;
}

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

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

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

.user-avatar {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.ai-avatar {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
}

.message-content {
    flex: 1;
    padding: 18px;
    border-radius: 18px;
    max-width: 75%;
    position: relative;
    overflow: hidden;
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-bottom-right-radius: 4px;
}

.ai-message .message-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--light);
    border-bottom-left-radius: 4px;
}

.message-text {
    margin-bottom: 10px;
    word-break: break-word;
    line-height: 1.5;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 8px;
}

/* ===== TYPING INDICATOR ===== */
.typing-indicator {
    display: flex;
    gap: 6px;
    padding: 10px 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.4;
    animation: typing 1.4s infinite ease-in-out;
}

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

@keyframes typing {
    0%, 100% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-6px); }
}

/* ===== INPUT SECTION ===== */
.input-section {
    border-top: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.8);
    padding: 20px 30px;
}

.input-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.input-box {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    transition: all 0.3s ease;
}

.input-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    flex: 1;
    background: none;
    border: none;
    color: var(--light);
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    max-height: 120px;
    outline: none;
    line-height: 1.5;
}

textarea::placeholder {
    color: var(--gray);
}

.send-btn {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

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

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--gray);
}

.model-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-tag {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.8rem;
}

.disclaimer {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .app-container {
        height: 100vh;
        border-radius: 0;
        max-width: 100%;
    }
    
    body {
        padding: 0;
    }
    
    .header, .input-section {
        padding: 15px 20px;
    }
    
    .welcome-section {
        padding: 25px 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .prompts-grid {
        grid-template-columns: 1fr;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .welcome-card h1 {
        font-size: 2rem;
    }
    
    .welcome-icon {
        font-size: 3.5rem;
    }
    
    .info-panel {
        display: none;
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
}
