:root {

    --bg-canvas: #F3F4F6;
    --bg-surface: #FFFFFF;
    --ink-primary: #111827;
    --ink-secondary: #6B7280;
    --brand-primary: #4F46E5;
    --brand-accent: #0EA5E9;
    --brand-success: #10B981;
    --brand-warm: #F59E0B;
    --brand-danger: #EF4444;
    --border-light: #E5E7EB;
    --nav-height: 64px;
    --radius: 12px;
}

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

html,
body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

body {
    background-color: var(--bg-canvas);
    color: var(--ink-primary);
    font-family: 'Inter', sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

h1,
h2,
h3,
h4,
button,
.brand-font {
    font-family: 'Space Grotesk', sans-serif;
}

header {
    height: var(--nav-height);
    background: #4C1D95;
    color: white;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
    flex-shrink: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    cursor: pointer;
    margin-right: 10px;
}

.nav-links {
    display: flex;
    gap: 20px;
    font-weight: 700;
    font-size: 0.95rem;
}

.nav-link {
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.nav-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.search-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.search-wrapper {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 16px;
    color: white;
    font-family: 'Inter';
    font-weight: 500;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.3);
}

.right-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.wallet-btn-mega {
    background: #10B981;
    color: white;
    font-weight: 800;
    font-size: 1rem;
    padding: 8px 20px;
    border-radius: 50px;
    border: 2px solid #fff;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: pulse 2s infinite;
    transition: transform 0.2s;
}

.wallet-btn-mega:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.profile-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
}

.avatar-circle {
    width: 36px;
    height: 36px;
    background: #F59E0B;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 2px solid white;
}

main {
    flex-grow: 1;
    overflow-y: auto;
    padding: 30px;
}

.city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.slot-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    aspect-ratio: 1/1;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.slot-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--ink-secondary);
}

.slot-card.my-slot {
    border: 3px solid var(--brand-warm);
}

.slot-body {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #F9FAFB;
    overflow: hidden;
}

.slot-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slot-meta {
    padding: 10px 14px;
    border-top: 1px solid var(--border-light);
    background: white;
}

.slot-title {
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mention {
    color: var(--brand-primary);
    font-weight: 700;
    cursor: pointer;
}

.mention:hover {
    text-decoration: underline;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.2s forwards;
}

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

.modal-card {
    background: var(--bg-surface);
    width: 95%;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.close-modal-btn {
    border: none;
    background: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--ink-secondary);
    transition: color 0.2s;
}

.close-modal-btn:hover {
    color: var(--ink-primary);
}

.manager-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-light);
    background: #f9fafb;
}

.manager-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    color: var(--ink-secondary);
}

.manager-tab.active {
    background: white;
    color: var(--brand-primary);
    border-bottom: 2px solid var(--brand-primary);
}

.manager-list {
    padding: 20px;
    overflow-y: auto;
    height: 400px;
}

.manage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin-bottom: 10px;
    background: white;
}

.manage-actions {
    display: flex;
    gap: 8px;
}

#profile-modal .modal-card {
    max-width: 900px;
    height: 85vh;
}

.profile-header {
    padding: 30px;
    background: linear-gradient(135deg, #4F46E5 0%, #818CF8 100%);
    color: white;
    display: flex;
    gap: 20px;
    align-items: center;
    position: relative;
}

.profile-avatar-lg {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    background-size: cover;
    background-position: center;
}

.profile-info {
    flex: 1;
}

.profile-username {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Space Grotesk';
}

.profile-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.profile-projects {
    flex: 2;
    padding: 20px;
    overflow-y: auto;
    border-right: 1px solid var(--border-light);
}

.profile-wall {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #F9FAFB;
    overflow: hidden;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.mini-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.mini-card:hover {
    transform: translateY(-2px);
    border-color: var(--brand-primary);
}

#viewer-modal .modal-card {
    max-width: 1200px;
    height: 85vh;
    display: flex;
    flex-direction: column;
}

.viewer-header {
    height: 50px;
    flex-shrink: 0;
    background: #fff;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.viewer-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: 100%;
}

.viewer-main {
    flex: 7;
    background: #000;
    border-right: 1px solid var(--border-light);
    position: relative;
    height: 100%;
}

#view-content {
    width: 100%;
    height: 100%;
}

.project-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
    display: block;
}

.viewer-sidebar {
    flex: 3;
    min-width: 340px;
    background: white;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.sidebar-actions {
    padding: 20px;
    background: #F9FAFB;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.sidebar-comments-area {
    flex: 1; 
    display: flex;
    flex-direction: column;
    overflow: hidden; 
}

.comment-list {
    flex: 1; 
    overflow-y: auto; 
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-bottom: 1px solid #F3F4F6;
    padding-bottom: 8px;
}

.comment-user {
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

.comment-content {
    font-size: 0.95rem;
    word-break: break-word;
}

.comment-input-box {
    padding: 15px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 8px;
    background: white;
    flex-shrink: 0; 
}

.input-group {
    margin-bottom: 15px;
}

label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--ink-primary);
}

input,
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-family: 'Inter';
    font-size: 1rem;
    background: #fff;
}

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: 0.2s;
    font-size: 0.95rem;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(0.95);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--brand-primary);
    color: white;
}

.btn-secondary {
    background: white;
    border: 1px solid var(--border-light);
    color: var(--ink-primary);
}

.btn-danger {
    background: var(--brand-danger);
    color: white;
}

.btn-success {
    background: var(--brand-success);
    color: white;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.8rem;
}

.btn-text-danger {
    background: transparent;
    color: var(--brand-danger);
    padding: 4px 8px;
}

.btn-text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

#friendly-modal .modal-card {
    max-width: 400px;
    text-align: center;
}

.friendly-icon {
    font-size: 4rem;
    margin-bottom: 10px;
}

.slide-panel {
    position: fixed;
    top: var(--nav-height);
    right: 0;
    bottom: 0;
    width: 360px;
    background: white;
    border-left: 1px solid var(--border-light);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 90;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.05);
}

.slide-panel.open {
    transform: translateX(0);
}

.chat-msgs {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #F9FAFB;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-bubble {
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    align-self: flex-start;
    max-width: 90%;
    font-size: 0.9rem;
    word-break: break-word;
}

.chat-bubble.self {
    background: #E0E7FF;
    border-color: #C7D2FE;
    align-self: flex-end;
}

.hidden {
    display: none !important;
}

.status-box {
    padding: 8px;
    margin-bottom: 10px;
    background: #FEF3C7;
    color: #92400E;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}