﻿/*
 * FROSTED GLASS POSTS UI
 * Clean, modern, translucent design with grey/white accents
 */

:root {
    /* Color Palette */
    --frost-bg: rgba(15, 15, 20, 0.4);
    --frost-border: rgba(255, 255, 255, 0.1);
    --frost-hover: rgba(255, 255, 255, 0.08);
    --accent-grey: #b0b0b0;
    --accent-white: #ffffff;
    --glass-blur: 40px;
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* === SOCIAL CONTAINER === */
.social-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.4) !important;
    backdrop-filter: blur(var(--glass-blur)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%) !important;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999 !important;
}

.social-container::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.22'/%3E%3C/svg%3E");
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
}

.social-container.active {
    display: flex;
}

/* Ambient Background Effect */
.social-container::before {
    content: "";
    position: absolute;
    width: 500px;
    height: 500px;
    top: -200px;
    right: -200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
    animation: ambientFloat 20s ease-in-out infinite;
}

@keyframes ambientFloat {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-30px, 30px);
    }
}

/* === HEADER === */
.social-header {
    height: 65px;
    position: relative;
    overflow: hidden;
    background: rgba(15, 15, 20, 0.5) !important;
    backdrop-filter: blur(25px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(200%) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
    flex-shrink: 0;
}

.social-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-white);
    margin: 0;
    letter-spacing: 1px;
}

/* === POSTS GRID === */
.posts-grid {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 650px;
    margin: 0 auto;
    width: 100%;
}

/* Custom Scrollbar */
.posts-grid::-webkit-scrollbar {
    width: 6px;
}

.posts-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.posts-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.posts-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* === FROST CARD (Post Card) === */
.frost-card {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(15px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(140%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.frost-card:hover {
    background: var(--frost-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* Post Header */
.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-grey), var(--accent-white));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #000;
    border: 2px solid var(--frost-border);
    flex-shrink: 0;
}

.post-header-info {
    flex: 1;
    min-width: 0;
}

.post-username {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-white);
    margin: 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.post-username:hover {
    color: var(--accent-grey);
}

.post-timestamp {
    font-size: 0.85rem;
    color: var(--accent-grey);
    opacity: 0.7;
}

/* Post Content */
.post-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 14px 0;
    word-wrap: break-word;
}

/* Post Image */
.post-image-wrapper {
    width: 100%;
    max-height: 400px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 14px;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-image-wrapper:hover .post-image {
    transform: scale(1.05);
}

/* Post Actions */
.post-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--frost-border);
}

.frost-action-btn {
    background: transparent;
    border: none;
    color: var(--accent-grey);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 6px 12px;
    border-radius: 8px;
}

.frost-action-btn:hover {
    background: var(--frost-hover);
    color: var(--accent-white);
}

.frost-action-btn i {
    font-size: 1.1rem;
}

.frost-action-btn.liked {
    color: #ff006e;
}

/* === FROST BUTTON === */
.frost-button {
    background: var(--frost-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--frost-border);
    color: var(--accent-white);
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.frost-button:hover {
    background: var(--frost-hover);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.frost-button i {
    font-size: 1rem;
}

/* === FROST TABS (Bottom Navigation) === */
.frost-tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(30px);
    border-top: 1px solid var(--frost-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.tab-item {
    background: transparent;
    border: none;
    color: var(--accent-grey);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    max-width: 120px;
}

.tab-item i {
    font-size: 1.3rem;
    transition: transform 0.2s ease;
}

.tab-item span {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

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

.tab-item.active i {
    transform: translateY(-3px);
}

.tab-item:hover {
    color: var(--accent-white);
}

/* === FROST MODAL === */
.frost-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

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

.frost-modal-content {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--frost-border);
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.frost-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.frost-modal-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-white);
    margin: 0;
}

.frost-close-btn {
    background: transparent;
    border: none;
    color: var(--accent-grey);
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.frost-close-btn:hover {
    background: var(--frost-hover);
    color: var(--accent-white);
}

/* === FROST INPUT === */
.frost-input {
    width: 100%;
    background: var(--frost-bg);
    border: 1px solid var(--frost-border);
    border-radius: 12px;
    padding: 14px;
    color: var(--accent-white);
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    transition: all 0.3s ease;
}

.frost-input:focus {
    outline: none;
    background: var(--frost-hover);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.frost-input::placeholder {
    color: var(--accent-grey);
    opacity: 0.6;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .social-header h1 {
        font-size: 1.3rem;
    }

    .posts-grid {
        padding: 12px;
        gap: 12px;
    }

    .frost-card {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(15px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(140%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

    .frost-modal-content {
        padding: 20px;
    }
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--accent-grey);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1.1rem;
    margin: 0;
}
/* === FROST ICON BUTTON (Back/Close) === */
.frost-icon-btn {
    background: transparent;
    border: none;
    color: var(--accent-white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 12px;
}

.frost-icon-btn:hover {
    background: var(--frost-hover);
    transform: translateX(-2px);
}

.frost-icon-btn i {
    font-size: 1.2rem;
}

/* FORCE MODAL ON TOP */
.frost-modal {
    z-index: 20000 !important;
}


.frost-card::before, .frost-modal-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--rough-frost-noise);
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
}


/* Unified Grain Overlays */
.social-header::before, .frost-tabs::before, .frost-card::after, .frost-modal-content::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.2'/%3E%3C/svg%3E");
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
}
