:root {
    /* Neutral and background colors inspired by methodmi.com */
    --background: #F1F0FB;
    --background-alt: #eaf0fa;
    --foreground: #403E43;
    --muted: #9F9EA1;
    --primary: #1EAEDB;
    --primary-hover: #0FA0CE;
    --secondary: #fff;
    --accent: #D6BCFA;
    --accent-light: #ecf0ff;
    --accent-dark: #8B5CF6;
    --border: #d8dcef;
    --radius: 20px;
    --shadow: 0 4px 24px rgba(30, 174, 219, 0.07), 0 2px 8px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 10px 32px 0 rgba(30, 174, 219, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 16px 56px 0 rgba(139, 92, 246, 0.12), 0 2px 8px rgba(0, 0, 0, 0.03);
    --transition: all 0.21s cubic-bezier(.28, .67, .36, 1);
}

/* Header with soft frosted look */
.header {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-lg);
    padding: 26px 38px;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1.5px solid #ebdbfa;
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 13px;
}

.logo i {
    font-size: 35px;
    color: var(--primary);
    filter: drop-shadow(0 0 6px #ecf6fd);
    animation: logoPulse 2.8s infinite;
}

@keyframes logoPulse {

    0%,
    100% {
        filter: none;
    }

    50% {
        filter: drop-shadow(0 0 20px #1EAEDB);
    }
}

.logo h1 {
    font-size: 29px;
    font-weight: 900;
    color: var(--accent-dark);
    text-shadow: 0 2px 10px #e5deff33;
    letter-spacing: 0.2px;
}

.search-section {
    max-width: 860px;
    margin: 68px auto 38px auto;
    animation: fadeIn 0.8s ease;
}

/* Modern gradient headline with pastel highlight */
.search-container h2 {
    font-size: 41px;
    margin-bottom: 18px;
    font-weight: 900;
    background-image: linear-gradient(90deg, #1EAEDB 30%, #D6BCFA 77%);
    background-clip: text;
    color: transparent;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.search-container p {
    color: var(--muted);
    margin-bottom: 30px;
    font-size: 22px;
    font-weight: 400;
    opacity: 0.89;
    letter-spacing: 0.01em;
}

.search-box {
    background: linear-gradient(125deg, #fff 80%, #ECF0FF 100%);
    padding: 37px 32px;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    border: 1.5px solid #e3e6fa;
    transition: box-shadow 0.23s;
}

.search-box form {
    display: flex;
    flex-direction: column;
    gap: 19px;
}

@media (min-width: 768px) {
    .search-box form {
        flex-direction: row;
    }
}

.search-box input {
    flex: 1;
    padding: 17px 22px;
    border: 2px solid var(--border);
    border-radius: 24px;
    font-size: 19px;
    background: #f9f6ff;
    color: #221f26;
    box-shadow: 0 2px 9px #e5deff39;
    transition: border-color 0.2s, box-shadow 0.18s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-dark);
    box-shadow: 0 0 0 4px #cbbcff33;
}

.search-box button {
    background: linear-gradient(90deg, #1EAEDB 35%, #8B5CF6 95%);
    color: #fff;
    border: none;
    padding: 17px 36px;
    border-radius: 24px;
    font-weight: 700;
    font-size: 19px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    box-shadow: 0 4px 18px #acd9fd48;
    transition: var(--transition);
}

.search-box button:hover {
    background: linear-gradient(90deg, #8B5CF6 40%, #1EAEDB 98%);
    transform: translateY(-2.5px) scale(1.03);
    box-shadow: 0 8px 40px #abcef688;
}

.search-box button i {
    font-size: 24px;
    transition: transform 0.26s;
}

.search-box button:hover i {
    transform: scale(1.19) rotate(-7deg);
}

/* --- Profile Card --- */
.profile-section {
    max-width: 1080px;
    margin: 0 auto 90px auto;
}

.profile-card {
    background: linear-gradient(111deg, #fff 75%, #ecf6ff 130%);
    border-radius: 25px;
    box-shadow: var(--shadow-lg);
    border: 2px solid #ede7fa;
    overflow: hidden;
    animation: scaleIn 0.5s cubic-bezier(.23, .996, .21, 1.11);
}

/* Profile Header */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 45px 28px;
    background: linear-gradient(90deg, #faf7ff, #ecf0ff 82%);
    border-bottom: 2px solid #e5e7ec;
    text-align: center;
}

@media (min-width: 768px) {
    .profile-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 44px;
        text-align: left;
        padding: 52px 58px 36px 47px;
    }
}

.profile-pic {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 6px solid var(--primary);
    overflow: hidden;
    flex-shrink: 0;
    margin-bottom: 26px;
    transition: all 0.42s cubic-bezier(.31, 1.1, .24, 1);
    box-shadow: 0 2px 24px #cbe0f8;
    background: linear-gradient(130deg, #eaf0fa, #fff 100%);
}

.profile-pic:hover {
    transform: scale(1.11) rotate(2.4deg);
    box-shadow: 0 10px 44px #1eaedb42;
}

@media (min-width: 768px) {
    .profile-pic {
        width: 172px;
        height: 172px;
        margin-bottom: 0;
    }
}

.profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1.04) contrast(1.12);
    border-radius: 50%;
    transition: transform 0.38s, filter 0.25s;
}

.profile-pic:hover img {
    transform: scale(1.15);
    filter: brightness(1.07) contrast(1.19);
}

.profile-info {
    flex: 1;
}

.profile-name {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 13px;
    margin-bottom: 18px;
}

@media (min-width: 768px) {
    .profile-name {
        flex-direction: row;
        align-items: center;
    }
}

.profile-name h3 {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.8px;
    color: var(--primary);
    background: linear-gradient(90deg, #1EAEDB, #8B5CF6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(90deg, #ecf0ff 45%, #f8fafc 100%);
    color: var(--accent-dark);
    padding: 7px 20px;
    border-radius: 27px;
    font-size: 17px;
    font-weight: 700;
    box-shadow: 0 2px 9px #bad7fc18;
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: linear-gradient(90deg, #29c1ee, #71f3ff 90%);
    border-radius: 50%;
    margin-right: 12px;
    animation: pulse 2.2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    48% {
        opacity: 0.68;
        transform: scale(1.18);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 36px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .profile-stats {
        justify-content: flex-start;
    }
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 88px;
    padding: 7px 0;
}

@media (min-width: 768px) {
    .stat {
        align-items: flex-start;
    }
}

.stat-count {
    font-size: 28px;
    font-weight: 900;
    color: var(--primary-hover);
    letter-spacing: -1px;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 15px;
    color: var(--muted);
    opacity: 0.89;
}

.profile-bio {
    color: var(--foreground);
    background: linear-gradient(90deg, #F1F0FB 0%, #fff 100%);
    padding: 17px 22px;
    border-radius: 11px;
    margin-top: 13px;
    font-size: 18px;
    box-shadow: 0 1px 3px #d3ddfa23;
    border: 1px solid #ede7fa;
}

/* Tabs */
.tabs {
    padding: 36px 26px;
    background: linear-gradient(120deg, #f8faff 92%, #ecf6ff 130%);
}

.tab-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    background: linear-gradient(93deg, #ecf6ff45 0%, #fafbff 100%);
    border-radius: 22px;
    padding: 11px 7px;
    margin-bottom: 36px;
    box-shadow: 0 2px 15px #a8d6fd12 inset;
}

.tab {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0;
    border: none;
    background: none;
    cursor: pointer;
    gap: 13px;
    border-radius: 14px;
    transition: var(--transition);
    color: var(--muted);
    font-size: 20px;
    font-weight: 700;
}

.tab i {
    font-size: 22px;
}

.tab.active {
    background: linear-gradient(97deg, #fff 77%, #e6dbfc 155%);
    color: var(--primary-hover);
    box-shadow: 0 3px 17px #8b5cf610;
    font-weight: 900;
    border: 1.5px solid #dee7fa;
    transform: scale(1.03);
}

.tab:hover:not(.active) {
    background: #f0eefb;
    color: var(--primary);
}

/* Grid and card styling for content */
.tab-content {
    display: none;
    animation: fadeIn 0.4s;
}

.tab-content.active {
    display: block;
}

/* --- Posts Grid --- */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

@media (max-width: 850px) {
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 540px) {
    .post-grid {
        grid-template-columns: 1fr;
    }
}

.post {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 1/1;
    transition: transform 0.38s, box-shadow 0.24s;
    box-shadow: var(--shadow);
    background: #f7f7fd;
}

.post:hover {
    transform: scale(1.05) translateY(-7px);
    box-shadow: var(--shadow-md);
}

.post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
    filter: brightness(1.065) contrast(1.11) saturate(1.04);
}

.post:hover img {
    transform: scale(1.12) rotate(1.5deg);
    filter: brightness(1.12) contrast(1.14);
}

.post-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(30, 174, 219, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.3s;
}

.post:hover .post-overlay {
    background-color: rgba(141, 92, 246, 0.18);
    opacity: 1;
}

.post-stats {
    display: flex;
    gap: 18px;
    color: white;
    background: linear-gradient(91deg, #1EAEDB 52%, #8B5CF6 144%);
    padding: 8px 19px;
    border-radius: 21px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 14px #1eaedbaa;
    opacity: 0.96;
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.post-stats i {
    font-size: 18px;
}

.download-btn {
    position: absolute;
    bottom: 18px;
    right: 18px;
    background: linear-gradient(97deg, #8B5CF6 32%, #1EAEDB 100%);
    border: none;
    width: 41px;
    height: 41px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s, background 0.33s;
    box-shadow: 0 4px 12px #aadbf64c;
    color: #fff;
    font-size: 24px;
}

.post:hover .download-btn,
.reel:hover .download-btn,
.story:hover .download-btn {
    opacity: 1;
}

.download-btn:hover {
    transform: scale(1.17) rotate(11deg);
    background: linear-gradient(90deg, #0FA0CE, #8B5CF6);
    box-shadow: 0 8px 18px #1EAEDB99;
}

/* --- Reels Grid --- */
.reel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

@media (max-width: 850px) {
    .reel-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 540px) {
    .reel-grid {
        grid-template-columns: 1fr;
    }
}

.reel {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 9/16;
    transition: transform 0.38s, box-shadow 0.28s;
    box-shadow: var(--shadow);
    background: #eaf0fa;
}

.reel:hover {
    transform: scale(1.055) translateY(-6px);
    box-shadow: var(--shadow-md);
}

.reel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.14) brightness(1.025);
    transition: transform 0.41s, filter 0.19s;
}

.reel:hover img {
    transform: scale(1.12);
    filter: contrast(1.21) brightness(1.11);
}

.reel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(30, 174, 219, 0.16) 0%, transparent 55%);
    display: flex;
    align-items: flex-end;
    padding: 21px;
}

.reel-stats {
    display: flex;
    gap: 22px;
    color: white;
    font-weight: 700;
    font-size: 17px;
    background: #bed2fa73;
    border-radius: 13px;
    padding: 9px 15px;
    box-shadow: 0 4px 14px #bfd8fc60;
}

/* --- Stories Grid --- */
.story-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

@media (min-width: 768px) {
    .story-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.story {
    border-radius: 17px;
    border: 2.6px solid var(--primary);
    padding: 4px;
    transition: transform 0.3s, border-color 0.2s, box-shadow 0.2s;
    background: linear-gradient(60deg, #fff 45%, #ECF0FF 110%);
}

.story:hover {
    transform: scale(1.05) translateY(-2.5px);
    border-color: var(--primary-hover);
    box-shadow: 0 10px 45px #bae6fd80;
}

.story-inner {
    position: relative;
    border-radius: 13px;
    overflow: hidden;
    aspect-ratio: 9/16;
    background: #fff;
}

.story-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1.06);
    transition: transform 0.35s, filter 0.15s;
}

.story:hover .story-inner img {
    transform: scale(1.13) rotate(1.3deg);
    filter: brightness(1.13) contrast(1.09);
}

.time-ago {
    position: absolute;
    top: 12px;
    left: 13px;
    background-color: #1EAEDBee;
    color: #fff;
    font-size: 14px;
    padding: 6px 15px;
    border-radius: 7px;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 8px #b6e6ff44;
    opacity: 0.91;
}

/* --- Highlights Grid --- */
.highlights-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 39px;
    justify-content: center;
}

.highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.highlight-circle {
    width: 94px;
    height: 94px;
    border-radius: 50%;
    border: 3.3px solid var(--accent);
    padding: 5.5px;
    transition: all 0.3s, border-color 0.21s;
    box-shadow: 0 3px 16px #bae6fd73;
    background: linear-gradient(60deg, #D6BCFA 2%, #ECF0FF 110%);
}

.highlight:hover .highlight-circle {
    transform: scale(1.10) rotate(4deg);
    border-color: var(--primary-hover);
    box-shadow: 0 8px 28px #33c3f0c6;
}

.highlight-circle img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    filter: contrast(1.13) brightness(1.10);
    transition: transform 0.3s, filter 0.2s;
}

.highlight:hover .highlight-circle img {
    transform: scale(1.17) rotate(6deg);
    filter: contrast(1.24) brightness(1.13);
}

.highlight-name {
    font-size: 16px;
    color: var(--accent-dark);
    font-weight: 800;
    letter-spacing: 0.01em;
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 38px;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -3px 16px 2px #d0e2f933;
    border-radius: 0 0 18px 18px;
    margin-bottom: 10px;
}

.disclaimer {
    font-size: 13px;
    margin-top: 8px;
    color: #898f99;
    opacity: 0.81;
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 900px) {
    .profile-section {
        max-width: 98vw;
    }

    .profile-card {
        border-radius: 18px;
    }

    .post-grid,
    .reel-grid {
        gap: 12px;
    }

    .highlight-circle {
        width: 68px;
        height: 68px;
    }
}

@media (max-width: 768px) {

    .post-grid,
    .reel-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .search-section {
        margin-top: 36px;
    }

    .search-container h2 {
        font-size: 27px;
    }

    .search-container p {
        font-size: 15px;
    }

    .highlight-circle {
        width: 55px;
        height: 55px;
    }

    .tabs {
        padding: 9px;
    }

    .profile-header {
        padding: 27px 8px;
    }
}

@media (max-width: 540px) {

    .post-grid,
    .reel-grid {
        grid-template-columns: 1fr;
    }

    .highlight-circle {
        width: 45px;
        height: 45px;
    }

    .profile-stats {
        gap: 12px;
    }

    .search-box button {
        padding: 8px 13px;
    }

    .header {
        padding: 9px 4px;
    }

    .search-container h2 {
        font-size: 16px;
    }
}

/* Skeleton shimmer effect */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton-wrapper {
    max-width: 1080px;
    margin: 40px auto;
    padding: 0 20px;
    animation: fadeIn 0.6s ease-in-out;
}

.skeleton {
    background: linear-gradient(90deg, #e2e2e2 25%, #f5f5f5 50%, #e2e2e2 75%);
    background-size: 200% 100%;
    animation: shimmer 1.3s linear infinite;
    border-radius: 8px;
}

/* Profile header skeleton */
.skeleton-profile-section {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 30px 0;
}

.skeleton-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    box-shadow: 0 0 0 4px #8b5cf6, 0 0 16px rgba(139, 92, 246, 0.3);
    background: #ddd;
}

.skeleton-profile-info {
    flex: 1;
}

.skeleton-line {
    height: 18px;
    margin-bottom: 10px;
    background: #e0e0e0;
    border-radius: 6px;
    animation: shimmer 1.3s linear infinite;
    background: linear-gradient(90deg, #eee 25%, #ddd 50%, #eee 75%);
    background-size: 200% 100%;
}

.skeleton-line.short {
    width: 40%;
}

.skeleton-line.xshort {
    width: 25%;
}

.skeleton-line.long {
    width: 90%;
    height: 22px;
}

.skeleton-stats {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.skeleton-line.stat {
    width: 70px;
    height: 20px;
}

/* Tabs */
.skeleton-tabs {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
    gap: 10px;
}

.skeleton-tab {
    height: 36px;
    flex: 1;
    border-radius: 30px;
    background: #ececec;
    animation: shimmer 1.3s infinite linear;
    background-image: linear-gradient(90deg, #eee 25%, #ddd 50%, #eee 75%);
    background-size: 200% 100%;
}

.skeleton-tab.active {
    box-shadow: 0 4px 18px rgba(139, 92, 246, 0.1);
    border: 1px solid #8b5cf6;
}

/* Post Cards */
.skeleton-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 26px;
}

.skeleton-post-card {
    height: 300px;
    border-radius: 16px;
    background: #eee;
    position: relative;
    overflow: hidden;
    animation: shimmer 1.3s linear infinite;
    background-image: linear-gradient(90deg, #eee 25%, #ddd 50%, #eee 75%);
    background-size: 200% 100%;
}

.error-message {
    color: red;
    text-align: center;
    margin-top: 20px;
    font-weight: bold;
}