body {
    font-family: 'Inter', 'Segoe UI', 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background: 
        linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 60px,
            rgba(59, 130, 246, 0.03) 60px,
            rgba(59, 130, 246, 0.03) 120px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 80px,
            rgba(59, 130, 246, 0.03) 80px,
            rgba(59, 130, 246, 0.03) 160px
        );
    background-size: 
        100% 100%,
        100% 100%,
        100% 100%;
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    transition: background 0.5s ease;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><image href="rune.png" width="40" height="40" opacity="0.08"/></svg>');
    background-size: 80px 80px;
    background-repeat: repeat;
    pointer-events: none;
    z-index: -1;
    animation: runePattern 20s linear infinite;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.9) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: 20px 12vw;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    transition: all 0.5s ease;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
}

.logo {
    font-size: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
    transition: all 0.5s ease;
}

.brand {
    text-align: left;
}

.brand-title {
    font-size: 28px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
    transition: color 0.5s ease;
}

.brand-subtitle {
    font-size: 16px;
    color: #64748b;
    margin: 4px 0 0 0;
    font-weight: 400;
    transition: color 0.5s ease;
}

.top-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 24px 12vw 0 12vw;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.menu-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.menu-buttons button, .menu-buttons a {
    padding: 12px 20px;
    font-size: 15px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
    cursor: pointer;
    transition: all 0.5s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    font-family: inherit;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.menu-buttons button:hover, .menu-buttons a:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

.welcome-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 12vw;
    text-align: center;
    color: #475569;
    flex-shrink: 0;
    min-height: 300px;
    transition: all 0.5s ease;
}

.welcome-content {
    max-width: 800px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 250, 252, 0.8) 100%);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 48px 40px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.5s ease;
}

.welcome-content h1 {
    font-size: 32px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 24px 0;
    line-height: 1.3;
    transition: color 0.5s ease;
}

.welcome-content p {
    font-size: 18px;
    line-height: 1.7;
    margin: 0 0 20px 0;
    color: #475569;
    transition: color 0.5s ease;
}

.welcome-content p:last-child {
    margin-bottom: 0;
}

#chat {
    flex: 1;
    padding: 32px 12vw 32px 12vw;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: transparent;
    min-height: 0;
}

.message {
    max-width: 75%;
    padding: 20px 24px;
    border-radius: 20px;
    line-height: 1.6;
    white-space: pre-wrap;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-size: 16px;
    transition: all 0.5s ease;
    font-weight: 400;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-text {
    word-wrap: break-word;
}

.copy-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.copy-btn {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: #64748b;
    font-family: inherit;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-btn:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: #fff;
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: #fff;
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.15);
    font-weight: 500;
    transition: all 0.5s ease;
}

.user .copy-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.5s ease;
}

.user .copy-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.2) 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

.assistant {
    align-self: flex-start;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #1e293b;
    border: 1px solid #e2e8f0;
    font-weight: 400;
    transition: all 0.5s ease;
}

.assistant .copy-btn {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-color: #cbd5e1;
    color: #64748b;
    transition: all 0.5s ease;
}

.assistant .copy-btn:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: #fff;
    border-color: #3b82f6;
}

.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.copy-notification.show {
    transform: translateX(0);
    opacity: 1;
}

#form {
    display: flex;
    padding: 20px 12vw;
    border-top: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    transition: all 0.5s ease;
}

#input {
    flex: 1;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #cbd5e1;
    border-radius: 16px;
    outline: none;
    transition: all 0.5s ease;
    background: #ffffff;
    font-family: inherit;
    font-weight: 400;
}

#input:focus {
    border: 2px solid #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

#send {
    margin-left: 16px;
    padding: 16px 24px;
    font-size: 16px;
    border: none;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: white;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
    transition: all 0.5s ease;
    font-family: inherit;
}

#send:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.25);
}

#send:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.2);
}

body.dark {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

body.dark .header {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(51, 65, 85, 0.9) 100%);
    border-bottom: 1px solid rgba(71, 85, 105, 0.6);
}

body.dark .brand-title {
    color: #e2e8f0;
}

body.dark .brand-subtitle {
    color: #94a3b8;
}

body.dark .welcome-content {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(51, 65, 85, 0.8) 100%);
    border: 1px solid rgba(71, 85, 105, 0.6);
}

body.dark .welcome-content h1 {
    color: #e2e8f0;
}

body.dark .welcome-content p {
    color: #cbd5e1;
}

body.dark .menu-buttons button, body.dark .menu-buttons a {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    color: #cbd5e1;
}

body.dark .menu-buttons button:hover, body.dark .menu-buttons a:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: #0f172a;
}

body.dark #chat {
    background: transparent;
}

body.dark .message.user {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: #fff;
}

body.dark .message.assistant {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #e2e8f0;
    border: 1px solid #475569;
}

body.dark .welcome-message {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border: 2px solid #475569;
    color: #cbd5e1;
}

body.dark .copy-btn {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    border-color: #475569;
    color: #cbd5e1;
}

body.dark .copy-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: #0f172a;
    border-color: #2563eb;
}

body.dark .user .copy-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

body.dark .user .copy-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.2) 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

body.dark #form {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-top: 1px solid #475569;
}

body.dark #input {
    background: #0f172a;
    color: #e2e8f0;
    border: 2px solid #475569;
}

body.dark #input:focus {
    border: 2px solid #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.1);
}

body.dark #send {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
}

body.dark #send:disabled {
    background: #475569;
}

body.dark .top-controls button {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    color: #cbd5e1;
}

body.dark .top-controls button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: #0f172a;
}

.hidden {
    display: none !important;
}

@media (max-width: 600px) {
    .header {
        padding: 16px 4vw;
    }
    
    .logo {
        width: 56px;
        height: 56px;
        font-size: 40px;
    }
    
    .brand-title {
        font-size: 24px;
    }
    
    .brand-subtitle {
        font-size: 14px;
    }
    
    .top-controls {
        padding: 16px 4vw 0 4vw;
    }
    
    .menu-buttons {
        gap: 8px;
    }
    
    .menu-buttons button, .menu-buttons a {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .welcome-section {
        padding: 30px 4vw;
        min-height: 250px;
    }
    
    .welcome-content {
        padding: 32px 24px;
        border-radius: 20px;
    }
    
    .welcome-content h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .welcome-content p {
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    #chat {
        padding: 20px 4vw 20px 4vw;
        font-size: 16px;
        gap: 16px;
    }
    
    .message {
        padding: 16px 20px;
        font-size: 15px;
        border-radius: 18px;
        gap: 8px;
    }
    
    .copy-btn {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    #form {
        padding: 16px 4vw;
    }
    
    #input {
        font-size: 16px;
        padding: 16px 18px;
    }
    
    #send {
        font-size: 16px;
        padding: 16px 20px;
    }
    
    .copy-notification {
        top: 16px;
        right: 16px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    /* Адаптация рун для мобильных устройств */
    body::before {
        background-size: 60px 60px;
        animation-duration: 20s;
    }
} 

/* Специальные эффекты для рун */
@keyframes runePattern {
    0% {
        transform: translateX(0) translateY(0);
    }
    100% {
        transform: translateX(-80px) translateY(-80px);
    }
}

@keyframes runeGlow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.1));
    }
    50% {
        filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.2));
    }
}

body::before {
    animation: runePattern 30s linear infinite;
}

/* Дополнительные эффекты для темной темы */
body.dark {
    background: 
        linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 60px,
            rgba(59, 130, 246, 0.05) 60px,
            rgba(59, 130, 246, 0.05) 120px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 80px,
            rgba(59, 130, 246, 0.05) 80px,
            rgba(59, 130, 246, 0.05) 160px
        );
}

body.dark::before {
    opacity: 0.12;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.15));
}

/* Эффект при наведении на кнопки */
.menu-buttons button:hover, .menu-buttons a:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
} 