:root {
    --bg-color: #050505;
    --text-color: #e0e0e0;
    --accent-color: #ff3333;
    --accent-glow: rgba(255, 51, 51, 0.5);
    --secondary-bg: #0a0a0a;
    --card-bg: rgba(20, 20, 20, 0.6);
    --border-color: #333;
    --sidebar-width: 280px;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 50% 0%, rgba(255, 51, 51, 0.15), transparent 40%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    background-attachment: fixed;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-top: 0;
}

h1 {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(255, 51, 51, 0.2);
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar .logo {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent-color);
    margin-bottom: 4rem;
    letter-spacing: -0.05em;
    text-shadow: 0 0 20px var(--accent-glow);
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar nav a {
    display: block;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: #888;
    border: 1px solid transparent;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: rgba(255, 51, 51, 0.1);
    color: #fff;
    border-color: rgba(255, 51, 51, 0.2);
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.1);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 4rem 6rem;
    min-height: 100vh;
}

/* Hero */
.hero {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 800px;
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero p {
    font-size: 1.5rem;
    color: #aaa;
    margin-bottom: 3rem;
    max-width: 600px;
    font-weight: 300;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background: var(--accent-color);
    color: white;
    font-weight: 600;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 5px 20px rgba(255, 51, 51, 0.3);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 51, 51, 0.5);
    background: #ff4d4d;
}

.btn:active {
    transform: translateY(0);
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 51, 51, 0.03), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.card:hover::before {
    transform: translateX(100%);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.card p {
    color: #888;
    font-size: 1rem;
    margin: 0;
}

/* Chat Interface */
.chat-wrapper {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 75vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.chat-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
}

.chat-messages {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message {
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    max-width: 80%;
    font-size: 1rem;
    line-height: 1.5;
    position: relative;
}

.message.user {
    background: rgba(255, 255, 255, 0.05);
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.message.ai {
    background: rgba(255, 51, 51, 0.1);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    border: 1px solid rgba(255, 51, 51, 0.2);
    color: #fff;
}

.chat-input-area {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 1rem;
}

.chat-input-area input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    color: white;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

.chat-input-area input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.1);
}

select#modelSelect {
    background: #000;
    color: #fff;
    border: 1px solid #333;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-family: inherit;
    cursor: pointer;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Code blocks */
pre {
    background: #000;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #333;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

code {
    color: var(--accent-color);
}