@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --primary: #673DE6;
    --primary-light: #845ef7;
    --background: #FFFFFF;
    --surface: #F9FAFB;
    --text-primary: #000000;
    --text-secondary: #6B7280;
    --radius-ios: 2rem;
    --shadow-ios: 0 4px 20px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

input,
textarea,
button,
select {
    font-family: inherit;
}

body {
    font-family: 'Aeonik', 'Outfit', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-user-select: none;
    user-select: none;
    overflow-x: hidden;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.ios-card {
    background: var(--background);
    border-radius: var(--radius-ios);
    padding: 1.5rem;
    box-shadow: var(--shadow-ios);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-ios);
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    display: inline-block;
}

.btn-primary:active {
    transform: scale(0.98);
    background-color: var(--primary-light);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: var(--radius-ios);
    font-weight: 600;
    text-align: center;
    border: 1.5px solid #E5E7EB;
    cursor: pointer;
    width: 100%;
}

.input-ios {
    width: 100%;
    background-color: #F3F4F6;
    border: 1.5px solid transparent;
    border-radius: 1rem;
    padding: 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-primary);
    transition: all 0.2s ease;
    outline: none;
}

.input-ios:focus {
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(103, 61, 230, 0.1);
}

/* PASSWORD TOGGLE */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    user-select: none;
}

/* NAVIGATION */
.nav-bottom {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 80px;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.08);
    border-radius: 40px 40px 0 0;
    z-index: 999999;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #000000;
    text-decoration: none;
    flex: 1;
    height: 100%;
    gap: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    width: 20px;
    height: 20px;
    transition: all 0.2s ease;
    filter: brightness(0) saturate(100%) invert(37%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(89%) contrast(90%);
}

.nav-item.active .nav-icon {
    filter: brightness(0) saturate(100%) invert(22%) sepia(95%) saturate(5000%) hue-rotate(258deg) brightness(90%) contrast(95%);
}

.nav-item span:not(.material-symbols-outlined) {
    font-size: 10px;
    font-weight: 500;
    color: #595959;
    display: block;
    line-height: 1;
    margin-top: 2px !important;
    margin-bottom: 0 !important;
}

.nav-item.active span:not(.material-symbols-outlined) {
    color: var(--primary);
}

/* PROFILE PAGE STYLES */
.profile-shell {
    padding: 20px 0;
    background: #FFFFFF;
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    margin-bottom: 30px;
}

.profile-header h1 {
    font-size: 18px;
    font-weight: 700;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid #F3F4F6;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.icon-btn.settings {
    color: var(--primary);
}

.profile-main-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 0px;
}

.avatar-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 15px;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.avatar-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    background: var(--primary);
    border: 3px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.avatar-upload-btn .material-symbols-outlined {
    font-size: 20px;
    font-variation-settings: 'FILL' 1, 'wght' 400;
}

.user-name {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: -7px;
    color: #000;
}

.profile-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.badge.role {
    background: #e8f7f0;
    color: #11ad7d;
}

.badge.points {
    background: #fff8e6;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-edit-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 25px;
    border: 1.5px solid #E5E7EB;
    background: white;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-edit-profile:active {
    background: #F9FAFB;
    transform: scale(0.98);
}

/* STATS */
.profile-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 10px 0px 1px 0px;
    border-top: 1px solid #F3F4F6;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

.stat-label {
    font-size: 13px;
    color: #6B7280;
    font-weight: 500;
}

/* TABS */
.profile-tabs {
    display: flex;
    border-top: 1.5px solid #F3F4F6;
    margin-top: 10px;
}

.tab-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    color: #6B7280;
    cursor: pointer;
    border-top: 2px solid transparent;
}

.tab-item.active {
    color: #000;
    border-top: 2px solid #000;
}

.tab-item .material-symbols-outlined {
    font-size: 24px;
}

/* POSTS GRID */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 2px;
}

.post-item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #F3F4F6;
    position: relative;
}

.post-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-item .post-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    font-size: 16px;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5));
}

/* MODAL STYLES */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000000;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 400px;
    border-radius: 30px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
}

/* TOAST NOTIFICATION */
.toast-container {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000000;
    pointer-events: none;
}

.toast {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(103, 61, 230, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: toastSlideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toastSlideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.toast.fade-out {
    animation: toastSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toastSlideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(-20px);
        opacity: 0;
    }
}

/* EMPTY STATE */
.empty-state {
    padding: 60px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    grid-column: 1 / -1;
    /* Ensure it spans the full width of a grid */
    width: 100%;
}

.empty-state .material-symbols-outlined {
    font-size: 64px;
    color: #E5E7EB;
    font-variation-settings: 'wght' 200;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

.empty-state p {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.4;
}

/* POST OPTIONS MENU */
.post-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.post-options-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #9CA3AF;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.post-options-btn:active {
    background: #F3F4F6;
    color: #000;
}

.post-options-menu {
    position: absolute;
    top: 40px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
    width: 160px;
    overflow: hidden;
    display: none;
    animation: menuFadeIn 0.2s ease-out;
}

.post-options-menu.active {
    display: block;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-options-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: background 0.2s;
}

.post-options-item:active {
    background: #F9FAFB;
}

.post-options-item.delete {
    color: #EF4444;
}

.post-options-item .material-symbols-outlined {
    font-size: 20px;
}

/* INVALID POST STYLES */
.post-card.invalid {
    opacity: 0.8;
}

.invalid-badge {
    background: #FEE2E2;
    color: #EF4444;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.invalid-warning {
    background: #fff8e6;
    color: #f59e0b;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    border: 1px solid #fef3c7;
}

/* CUSTOM MODAL SYSTEM */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999 !important;
    padding: 24px;
    animation: modalOverlayFadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex !important;
}

.modal-card {
    background: white !important;
    width: 100% !important;
    max-width: 320px !important;
    border-radius: 28px !important;
    padding: 32px 24px !important;
    text-align: center !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

.modal-icon-wrapper {
    width: 64px !important;
    height: 64px !important;
    border-radius: 50% !important;
    background: #F3F4F6 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 20px auto !important;
}

.modal-icon-wrapper.warning {
    background: #FFF7ED !important;
    color: #F97316 !important;
}

.modal-icon-wrapper.danger {
    background: #FEF2F2 !important;
    color: #EF4444 !important;
}

.modal-icon-wrapper.success {
    background: #F0FDF4 !important;
    color: #22C55E !important;
}

.modal-icon-wrapper .material-symbols-outlined {
    font-size: 32px !important;
}

.modal-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin-bottom: 12px !important;
}

.modal-message {
    font-size: 15px !important;
    color: #6B7280 !important;
    line-height: 1.5 !important;
    margin-bottom: 32px !important;
}

.modal-footer {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.modal-btn {
    padding: 14px !important;
    border-radius: 16px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    width: 100% !important;
    font-family: inherit !important;
}

.modal-btn-primary {
    background: #000 !important;
    color: white !important;
}

.modal-btn-danger {
    background: #EF4444 !important;
    color: white !important;
}

.modal-btn-secondary {
    background: #F3F4F6 !important;
    color: #4B5563 !important;
}

@keyframes modalOverlayFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
 / *   S K E L E T O N   U I   * / 
 . s k e l e t o n   { 
         b a c k g r o u n d :   # f 0 f 0 f 0 ; 
         b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 9 0 d e g ,   # f 0 f 0 f 0   2 5 % ,   # e 0 e 0 e 0   5 0 % ,   # f 0 f 0 f 0   7 5 % ) ; 
         b a c k g r o u n d - s i z e :   2 0 0 %   1 0 0 % ; 
         a n i m a t i o n :   s k e l e t o n - l o a d i n g   1 . 5 s   i n f i n i t e ; 
         b o r d e r - r a d i u s :   8 p x ; 
 } 
 
 @ k e y f r a m e s   s k e l e t o n - l o a d i n g   { 
         0 %   {   b a c k g r o u n d - p o s i t i o n :   2 0 0 %   0 ;   } 
         1 0 0 %   {   b a c k g r o u n d - p o s i t i o n :   - 2 0 0 %   0 ;   } 
 } 
 
 . s k e l e t o n - p o s t   { 
         m a r g i n - b o t t o m :   2 4 p x ; 
         p a d d i n g :   0 ; 
 } 
 
 . s k e l e t o n - h e a d e r   { 
         d i s p l a y :   f l e x ; 
         a l i g n - i t e m s :   c e n t e r ; 
         g a p :   1 2 p x ; 
         m a r g i n - b o t t o m :   1 2 p x ; 
         p a d d i n g :   0   2 0 p x ; 
 } 
 
 . s k e l e t o n - a v a t a r   { 
         w i d t h :   3 2 p x ; 
         h e i g h t :   3 2 p x ; 
         b o r d e r - r a d i u s :   5 0 % ; 
 } 
 
 . s k e l e t o n - n a m e   { 
         w i d t h :   1 2 0 p x ; 
         h e i g h t :   1 4 p x ; 
         m a r g i n - b o t t o m :   6 p x ; 
 } 
 
 . s k e l e t o n - t i m e   { 
         w i d t h :   8 0 p x ; 
         h e i g h t :   1 0 p x ; 
 } 
 
 . s k e l e t o n - i m a g e   { 
         w i d t h :   1 0 0 % ; 
         a s p e c t - r a t i o :   1   /   1 ; 
         b o r d e r - r a d i u s :   0 ; 
 } 
 
 . s k e l e t o n - a c t i o n s   { 
         d i s p l a y :   f l e x ; 
         g a p :   1 5 p x ; 
         p a d d i n g :   1 5 p x   2 0 p x ; 
 } 
 
 . s k e l e t o n - a c t i o n   { 
         w i d t h :   2 4 p x ; 
         h e i g h t :   2 4 p x ; 
         b o r d e r - r a d i u s :   5 0 % ; 
 } 
 
 . s k e l e t o n - t e x t   { 
         h e i g h t :   1 2 p x ; 
         m a r g i n - b o t t o m :   8 p x ; 
         b o r d e r - r a d i u s :   4 p x ; 
 } 
  
 