﻿* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    font-family: "Manrope", sans-serif;
    color: #111827;
    background: linear-gradient(120deg, #fef3f2 0%, #f5f7ff 35%, #eefbf7 70%, #fff8e6 100%);
    background-size: 200% 200%;
    animation: bgShift 12s ease infinite;
}

body {
    overflow: hidden;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.topbar {
    width: min(980px, calc(100vw - 32px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    border-radius: 28px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.08);
    margin-bottom: 34px;
}

.profile-panel {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #7e62ff, #4fb1ff);
    color: #ffffff;
    font-weight: 800;
    font-size: 22px;
    box-shadow: 0 14px 35px rgba(79, 177, 255, 0.24);
}

.profile-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.profile-text strong {
    font-size: 16px;
    font-weight: 700;
}

.profile-text span {
    color: #6b7280;
    font-size: 13px;
}

.topbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.profile-button,
.chat-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 16px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: #ffffff;
    color: #111827;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.profile-button:hover,
.chat-button:hover {
    background: #f3f4f6;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
    border-color: rgba(17, 24, 39, 0.15);
}

.upload-button-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(90deg, #7e62ff, #4fb1ff, #7e62ff);
    background-size: 200% 100%;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    font-family: "Manrope", sans-serif;
    transition: box-shadow 0.3s ease;
    animation: gradientSlide 4s ease infinite;
    box-shadow: 0 8px 20px rgba(79, 177, 255, 0.3);
}

.upload-button-header:hover {
    box-shadow: 0 12px 28px rgba(79, 177, 255, 0.5);
}

.chat-button svg {
    width: 18px;
    height: 18px;
}

.content-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-grid-shell {
    width: min(1200px, 100%);
    height: min(820px, 84vh);
    border-radius: 36px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 24px 90px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(22px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}



.main-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: scroll;
    z-index: 1;
}

.grid-card {
    min-height: 300px;
    border-radius: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(145deg, #ffffff 0%, #f3f5fb 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.upload-button {
    padding: 12px 22px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(17, 24, 39, 0.05);
    transition: box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    font-family: "Manrope", sans-serif;
}

.upload-button:hover {
    background: #eceff3;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.08);
    border-color: #bfdbfe;
}

.upload-button:active {
    animation: uploadPress 0.22s ease;
    background: #e5e7eb;
}

.grid-card--small {
    min-height: 300px;
    border-radius: 22px;
    border: 2px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(135deg, #fdfefe 0%, #eef2f8 100%);
    background-size: cover;
    background-position: center;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-card--small:hover {
    box-shadow: 0 16px 36px rgba(79, 177, 255, 0.15);
    border-color: rgba(79, 177, 255, 0.3);
}

.grid-card-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

@keyframes likePulse {
    0% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.16) rotate(-8deg);
    }
    70% {
        transform: scale(0.95) rotate(6deg);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes bgShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes gradientSlide {
    0% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
    100% {
        background-position: 0% center;
    }
}

@keyframes pulseBlock {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; }
}

@media (max-width: 740px) {
    .topbar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .profile-panel {
        justify-content: center;
        width: 100%;
    }

    .main-grid-shell {
        height: auto;
        min-height: 70vh;
    }

    .main-grid {
        grid-template-columns: 1fr;
    }
}
