:root {
    --bg-color: #111111;
    --text-primary: #ffffff;
    --text-secondary: #71767b;
    --accent-blue: #1d9bf0;
    --border-color: #2f3336;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding-top: 80px;
}

/* TOP NAV */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-container {
    width: 100%;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-actions {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: none;
    border-radius: 4px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.layout {
    display: flex;
    gap: 15px;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
}

/* MAIN COLUMN */
.main-column {
    flex: 1;
    max-width: 580px;
}

.banner {
    width: 100%;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(15px);
    transform: scale(1.1);
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 10px;
    margin-top: -45px;
    position: relative;
    z-index: 2;
}

.avatar-container {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--bg-color);
    overflow: hidden;
    background-color: var(--bg-color);
}

.avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.actions {
    display: flex;
    gap: 10px;
    margin-top: 55px;
}

.share-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.share-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.follow-btn {
    background-color: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0 20px;
    height: 32px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.follow-btn:hover {
    background-color: #1a8cd8;
}

.profile-info {
    padding: 5px 10px;
}

.name {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 2px;
}

.verified {
    color: var(--accent-blue);
    font-size: 14px;
}

.handle {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 2px;
}

.status {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 35px;
}

.bio {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 15px 0;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
}

.tab.active {
    color: var(--accent-blue);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-blue);
}

/* MEDIA GRIDS */
.media-grid-main {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.media-grid-side {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.side-column {
    width: 265px;
}

.media-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background-color: #1a1a1a;
}

.media-item.rect {
    aspect-ratio: 4/3;
}

.media-item.square {
    aspect-ratio: 1/1;
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(6px);
    transform: scale(1.06); /* Remove soft edges from blur */
}

.lock-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 24px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

@media (max-width: 900px) {
    .side-column {
        display: none;
    }
    .layout {
        justify-content: center;
        padding: 0 15px;
    }
}

/* AUTH MODAL */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

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

.modal-box {
    background: #ffffff;
    border-radius: 24px;
    padding: 36px 32px 32px;
    width: 100%;
    max-width: 390px;
    position: relative;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.15);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: transparent;
    border: none;
    color: #8e96a0;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333333;
}

.modal-title {
    font-size: 21px;
    font-weight: 800;
    color: #000000;
    margin-bottom: 24px;
    line-height: 1.35;
    text-align: center;
    letter-spacing: -0.3px;
}

.modal-brand {
    color: #2481cc;
}

.modal-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #8e96a0;
    margin-bottom: 8px;
}

.modal-field {
    margin-bottom: 24px;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.modal-input {
    width: 100%;
    background: #ffffff;
    border: 1px solid #d2d6dc;
    border-radius: 10px;
    color: #000000;
    font-size: 16px;
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.modal-input:focus {
    border-color: #2481cc;
    box-shadow: 0 0 0 3px rgba(36, 129, 204, 0.12);
}

.modal-submit {
    width: 100%;
    background: #3897f0;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
    letter-spacing: 0.2px;
}

.modal-submit:hover {
    background: #2481cc;
}

.modal-submit:active {
    transform: scale(0.98);
}

.modal-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ERROR TOOLTIP */
.error-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 20px;
    z-index: 100;
    background: #ffffff;
    border: 1px solid #d2d6dc;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    pointer-events: none;
    animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}

@keyframes popIn {
    from { transform: scale(0.9) translateY(-5px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}

.error-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 24px;
    border: 6px solid transparent;
    border-bottom-color: #d2d6dc;
}

.error-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 25px;
    border: 5px solid transparent;
    border-bottom-color: #ffffff;
    margin-bottom: -1px;
}

.error-tooltip .icon {
    background: #f39c12;
    color: #ffffff;
    font-weight: 900;
    font-size: 11px;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
}

.error-tooltip .text {
    color: #000000;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}
