@import url('fonts.css');

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Zalando Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: rgba(0, 0, 0, 1);
    color: #f0f6fc;
    height: 100vh;
    display: flex;
    overflow: hidden;
    position: relative;
    font-weight: 500;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(88, 166, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    min-width: 0;
    position: relative;
    z-index: 1;
    animation: fadeIn 0.6s ease;
}

.main-header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #f0f6fc;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.header-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #f0f6fc;
    flex: 1;
}

.model-selector {
    background: rgba(88, 166, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(88, 166, 255, 0.3);
    border-radius: 12px;
    padding: 0.6rem 1.2rem;
    color: #f0f6fc;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%238b949e' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.model-selector::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(88, 166, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.model-selector:hover {
    background: rgba(88, 166, 255, 0.25);
    border-color: rgba(88, 166, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(88, 166, 255, 0.3);
}

.model-selector:hover::before {
    left: 100%;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    min-height: 0;
}

.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 2rem;
    animation: fadeInScale 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-screen.fade-out {
    opacity: 0;
    transform: translateY(-30px);
    pointer-events: none;
}

.welcome-icon {
    width: 150px;
    height: 150px;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin-bottom: 2rem;
    animation: float 4s ease-in-out infinite;
    box-shadow: none;
    position: relative;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #00d4ff 0%, #9d4edd 25%, #58a6ff 50%, #7c3aed 100%);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 5s ease infinite;
    letter-spacing: -0.5px;
    position: relative;
}

.welcome-title::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    background: linear-gradient(135deg, #00d4ff, #9d4edd);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: blur(10px);
    opacity: 0.5;
}

.welcome-subtitle {
    color: #8b949e;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 600px;
    width: 100%;
}

.quick-action {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    padding: 1.8rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
}

.quick-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(88, 166, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.quick-action:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(88, 166, 255, 0.4);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 48px rgba(88, 166, 255, 0.3),
                0 8px 32px rgba(0, 0, 0, 0.4);
}

.quick-action:hover::before {
    left: 100%;
}

.quick-action:nth-child(1) { animation: fadeInUp 0.5s ease 0.1s both; }
.quick-action:nth-child(2) { animation: fadeInUp 0.5s ease 0.2s both; }
.quick-action:nth-child(3) { animation: fadeInUp 0.5s ease 0.3s both; }
.quick-action:nth-child(4) { animation: fadeInUp 0.5s ease 0.4s both; }

.action-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
    transition: transform 0.3s ease;
}

.quick-action:hover .action-icon {
    transform: scale(1.2) rotate(5deg);
    animation: bounce 0.5s ease;
}

.action-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #f0f6fc;
}

.action-desc {
    font-size: 0.85rem;
    color: #8b949e;
    line-height: 1.4;
}

.message {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    max-width: 100%;
}

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

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

.user .message-avatar {
    background: linear-gradient(45deg, #58a6ff, #1f6feb);
    color: white;
}

.assistant .message-avatar {
    background: linear-gradient(45deg, #00d4ff, #9d4edd);
    color: white;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-text {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 1rem;
    line-height: 1.6;
    word-wrap: break-word;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.user .message-text {
    background: rgba(88, 166, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(88, 166, 255, 0.4);
    color: white;
    box-shadow: 0 4px 20px rgba(88, 166, 255, 0.3);
}

.sidebar-nav::-webkit-scrollbar,
.messages-container::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track,
.messages-container::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb,
.messages-container::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover,
.messages-container::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}
