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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: #000000;
    color: #ffffff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.app {
    min-height: 100vh;
    padding-bottom: 80px;
}

/* Экраны */
.screen {
    display: none;
    animation: fadeIn 0.3s;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Hero секция */
.hero {
    text-align: center;
    padding: 60px 24px 40px;
}

.hero-logo {
    height: 100px;
    width: auto;
    margin-bottom: 24px;
    filter: drop-shadow(0 4px 12px rgba(212, 175, 55, 0.4));
}

.hero-subtitle {
    font-size: 16px;
    line-height: 1.5;
    color: #999999;
    margin-bottom: 32px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.btn-hero {
    background: #ffffff;
    color: #000000;
    border: none;
    padding: 18px 48px;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
}

.btn-hero:active {
    transform: scale(0.98);
}

/* Возможности */
.features {
    padding: 0 16px 24px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    padding: 0 8px;
}

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

.feature-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 20px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.feature-card:active {
    transform: scale(0.98);
    background: #222222;
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.feature-card p {
    font-size: 13px;
    color: #999999;
}

/* Заголовок экрана */
.screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #2a2a2a;
    position: sticky;
    top: 0;
    background: #000000;
    z-index: 100;
}

.screen-header h1 {
    font-size: 20px;
    font-weight: 700;
    flex: 1;
    text-align: center;
}

.btn-back, .btn-all {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 18px;
    padding: 8px;
    cursor: pointer;
    min-width: 40px;
}

.btn-all {
    color: #d4af37;
    font-size: 16px;
}

/* Галерея стилей */
.styles-grid {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.style-card {
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.style-card:active {
    transform: scale(0.98);
}

.style-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.style-info {
    padding: 12px;
}

.style-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.style-info p {
    font-size: 13px;
    color: #999999;
    line-height: 1.4;
}

/* Примерка */
.tryon-container {
    padding: 16px;
}

.upload-zone {
    background: #1a1a1a;
    border: 2px dashed #3a3a3a;
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 24px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.upload-placeholder p {
    color: #999999;
    margin-bottom: 20px;
    font-size: 15px;
}

.preview-image, .result-image {
    max-width: 100%;
    border-radius: 16px;
}

/* Выбор стиля */
.style-selector {
    margin-bottom: 24px;
}

.style-selector h3 {
    font-size: 18px;
    margin-bottom: 16px;
}

.style-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.style-chip {
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.style-chip.selected {
    background: #d4af37;
    color: #000000;
    border-color: #d4af37;
}

/* Кнопки */
.btn-primary {
    background: #ffffff;
    color: #000000;
    border: none;
    padding: 14px 32px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-full {
    width: 100%;
}

.btn-success {
    background: #d4af37;
    color: #000000;
    border: none;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
}

.btn-secondary {
    background: #2a2a2a;
    color: #ffffff;
    border: 1px solid #3a3a3a;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
}

.result-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* Загрузка */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #2a2a2a;
    border-top: 4px solid #d4af37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: #999999;
    font-size: 15px;
}

/* Чат */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    animation: slideIn 0.3s;
}

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.message-content {
    background: #1a1a1a;
    padding: 12px 16px;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    max-width: 75%;
    line-height: 1.5;
    font-size: 15px;
}

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

.user-message .message-avatar {
    background: #d4af37;
}

.user-message .message-content {
    background: #2a2a2a;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 4px;
}

.chat-input-container {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #2a2a2a;
    background: #000000;
}

#chatInput {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 20px;
    padding: 12px 16px;
    color: #ffffff;
    font-size: 15px;
    resize: none;
    font-family: inherit;
    max-height: 100px;
}

#chatInput:focus {
    outline: none;
    border-color: #3a3a3a;
}

.btn-send {
    width: 44px;
    height: 44px;
    background: #d4af37;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.btn-send span {
    font-size: 20px;
    color: #000000;
}

/* Нижняя навигация */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #000000;
    border-top: 1px solid #2a2a2a;
    display: flex;
    padding: 8px 0;
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: #666666;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s;
}

.nav-item.active {
    color: #ffffff;
}

.nav-icon {
    font-size: 24px;
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
}

/* Адаптивность */
@media (max-width: 380px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-label {
        font-size: 10px;
    }
}
