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

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: #f8f6f1 !important;
    background-image: none !important;
    color: #2a2a2a;
    line-height: 1.6;
}

/* Header */
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #fff;
    border-bottom: 1px solid #e8e4dc;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #1a1a1a;
}

.gallery-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #555;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-link:hover {
    background: #f8f6f1;
    color: #1a1a1a;
    border-color: #e8e4dc;
}

.location {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}

/* Main layout */
.artwork-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.artwork-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Image section */
.artwork-image-section {
    position: relative;
    background: #fff;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.artwork-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
}

.image-overlay {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
}

.status-badge {
    background: #2d5a3d;
    color: #fff;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-radius: 2px;
}

/* Info section */
.artwork-info {
    padding-top: 1rem;
}

.artwork-title {
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 0.3rem;
    color: #1a1a1a;
}

.artwork-subtitle {
    font-size: 1.1rem;
    color: #666;
    font-style: italic;
    margin-bottom: 1.5rem;
    font-family: 'Georgia', serif;
}

.artwork-meta {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    padding: 1.2rem;
    background: #fff;
    border-radius: 4px;
    border-left: 3px solid #c9a84c;
}

.meta-item {
    display: flex;
    gap: 0.5rem;
}

.meta-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-width: 100px;
}

.meta-value {
    font-size: 0.95rem;
    color: #333;
}

.artwork-description {
    margin-bottom: 2rem;
}

.artwork-description p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Symbolism */
.symbolism-section {
    margin-bottom: 2rem;
}

.symbolism-section h3 {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #666;
}

.symbolism-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.symbol-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 0.8rem;
    background: #fff;
    border-radius: 4px;
}

.symbol-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.symbol-text {
    font-size: 0.9rem;
    color: #444;
}

/* Chat toggle button */
.chat-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    background: #1a1a1a;
    color: #c9a84c;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-family: 'Georgia', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.chat-toggle-btn:hover {
    background: #2a2a2a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.chat-icon {
    font-size: 1.2rem;
}

/* Chat widget */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 380px;
    height: 520px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
}

.chat-widget.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
    background: #1a1a1a;
    color: #fff;
}

.guardian-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #c9a84c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
}

.guardian-info {
    flex: 1;
}

.guardian-name {
    font-size: 1rem;
    font-weight: 600;
}

.guardian-status {
    font-size: 0.75rem;
    color: #aaa;
}

.chat-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    line-height: 1;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    background: #faf9f7;
}

.message {
    max-width: 85%;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.message.system-message {
    background: #fff;
    border: 1px solid #e8e4dc;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.message.user-message {
    background: #1a1a1a;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.suggested-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    background: #faf9f7;
    border-top: 1px solid #e8e4dc;
}

.suggested-btn {
    background: #fff;
    border: 1px solid #d4d0c8;
    border-radius: 16px;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    font-family: 'Georgia', serif;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggested-btn:hover {
    background: #1a1a1a;
    color: #c9a84c;
    border-color: #1a1a1a;
}

.chat-input-area {
    padding: 0.8rem 1rem;
    background: #fff;
    border-top: 1px solid #e8e4dc;
}

.typing-indicator {
    display: none;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.typing-indicator.active {
    display: block;
}

.dots {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.input-row {
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
    padding: 0.7rem 1rem;
    border: 1px solid #d4d0c8;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: 'Georgia', serif;
    outline: none;
}

.chat-input:focus {
    border-color: #c9a84c;
}

.voice-btn {
    background: #1a1a1a;
    color: #c9a84c;
    border: 2px solid #c9a84c;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    font-size: 1.4rem;
    transition: all 0.2s ease;
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.voice-btn:hover {
    background: #333;
    transform: scale(1.1);
}

.voice-btn.recording {
    background: #c44;
    color: #fff;
    border-color: #c44;
    animation: pulse 1s infinite;
    transform: scale(1.15);
}

.voice-hint {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    margin-top: 0.4rem;
    font-style: italic;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.send-btn {
    background: #1a1a1a;
    color: #c9a84c;
    border: none;
    border-radius: 4px;
    width: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.2s ease;
}

.send-btn:hover {
    background: #2a2a2a;
}

/* ═══ Shared Header / Шапка всех страниц ═══ */
.contact-bar {
    background: #1a1a1a;
    color: #c9a84c;
    padding: 0.8rem 2rem;
    text-align: center;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.contact-bar a { color: #c9a84c; text-decoration: none; }
.contact-bar a:hover { text-decoration: underline; }
.contact-bar .contact-item { display: flex; align-items: center; gap: 0.4rem; }

.gallery-hero {
    text-align: center; padding: 2.5rem 2rem;
    background: #fff;
    border-bottom: 1px solid #e8e4dc;
}
.gallery-hero h1 {
    font-size: 2.2rem; font-weight: 400; margin-bottom: 0.5rem; color: #1a1a1a;
}
.gallery-hero p {
    color: #666; font-size: 1rem; font-style: italic;
}
.gallery-hero .location-badge {
    display: inline-block; margin-top: 1rem;
    padding: 0.5rem 1.2rem; background: #1a1a1a; color: #c9a84c;
    border-radius: 4px; font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .artwork-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .chat-widget {
        width: calc(100% - 2rem);
        height: 60vh;
        bottom: 1rem;
        right: 1rem;
    }
    
    .artwork-page {
        padding: 1rem;
    }
    
    .gallery-header {
        padding: 0.8rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .gallery-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .nav-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    /* Collection grid mobile */
    .collection-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 0 0.5rem !important;
    }
    
    .collection-card {
        max-width: 100% !important;
    }
    
    .collection-card-image {
        height: 200px !important;
    }
    
    /* Form mobile */
    .form-row {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .form-group {
        width: 100% !important;
    }
    
    .add-artwork-page {
        padding: 1rem !important;
        max-width: 100% !important;
    }
    
    .form-section {
        padding: 1rem !important;
    }
    
    /* Artwork page mobile */
    .artwork-main {
        padding: 1rem !important;
    }
    
    .artwork-image-container {
        max-height: 300px !important;
    }
    
    /* NFT block mobile */
    #nftPriceBlock > div:first-child {
        grid-template-columns: 1fr !important;
    }
    
    /* Messenger widget mobile */
    .messenger-widget {
        width: calc(100% - 2rem) !important;
        right: 1rem !important;
        left: 1rem !important;
    }
    
    /* News grid mobile */
    .news-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Profile page mobile */
    .profile-page {
        padding: 1rem !important;
    }
    
    /* Gallery list mobile */
    .gallery-list {
        padding: 0 0.5rem !important;
    }
    
    /* Photo upload mobile */
    .photo-upload {
        padding: 1rem !important;
    }
    
    /* Tables mobile */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Ensure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Button full width on mobile */
    .btn-submit {
        width: 100%;
    }
    
    /* Prevent text overflow */
    h1, h2, h3, p {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* === MOBILE BURGER MENU FIX === */
.burger-btn {
    display: none;
    background: none;
    border: 1px solid #e8e4dc;
    border-radius: 4px;
    font-size: 1.4rem;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    color: #1a1a1a;
    line-height: 1;
}

@media (max-width: 768px) {
    .burger-btn {
        display: block;
        order: 2;
    }
    
    .gallery-header {
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    
    .logo {
        font-size: 1.1rem;
        order: 1;
        flex-shrink: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .location {
        display: none;
    }
    
    .gallery-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid #e8e4dc;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        padding: 0.5rem 1rem;
        flex-direction: column;
        gap: 0;
        z-index: 200;
        order: 3;
        width: 100%;
        margin-top: 0;
    }
    
    .gallery-nav.mobile-open {
        display: flex;
    }
    
    .nav-link {
        display: block;
        padding: 0.8rem 1rem;
        border-bottom: 1px solid #f0ede8;
        font-size: 0.95rem;
        width: 100%;
        text-align: left;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Contact bar mobile */
    .contact-bar {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    /* Gallery hero mobile */
    .gallery-hero {
        padding: 2rem 1rem;
    }
    
    .gallery-hero h1 {
        font-size: 1.8rem;
    }
    
    /* Feed section mobile */
    .feed-section {
        padding: 1.5rem 1rem;
    }
    
    /* News section mobile */
    .news-section {
        padding: 1.5rem 1rem;
    }
    
    .news-scroll {
        gap: 0.8rem;
    }
    
    .news-tile {
        flex: 0 0 260px;
    }
}

@media (max-width: 480px) {
    .gallery-hero h1 {
        font-size: 1.5rem;
    }
    
    .gallery-hero p {
        font-size: 0.95rem;
    }
    
    .contact-bar {
        font-size: 0.8rem;
    }
    
    .news-tile {
        flex: 0 0 240px;
    }
}
