/* RESET GLOBAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

/* VARIÁVEIS DO APP (MUDE AQUI NO FUTURO) */
:root {
    --bg-app: var(--background-app);
    --text-main: var(--on-background);
    
    --primary-color: var(--button);
    --secondary-color: var(--on-button);
    
    --btn-radius: 10px;
    --btn-padding: 12px 22px;
}

/* BODY */
body {
    background: var(--bg-app);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    color: var(--on-background);
}


/* CONTAINER DO APP (SIMULA TELA MOBILE) */
.app-container {
    width: 100%;
    max-width: 420px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-app);
}

.center-screen {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* BOX CENTRAL */
.welcome-box {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* TEXTO */
.welcome-box h1 {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.3;
}

/* GRUPO DE BOTÕES */
.button-group{
    width: 100%;
    display: flex;
    gap: 12px;
    padding: 0 10px;
}

.button-group .btn{
    flex: 1;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
}

/* BOTÕES BASE */
.btn {
    border: none;
    padding: var(--btn-padding);
    border-radius: var(--btn-radius);
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}

/* PROFILE TABS */
.profile-tabs {
    display: flex;
    justify-content: space-around;
    width: 100%;
    padding: 8px 16px;
    background: var(--bg-card);
    border-radius: 12px;
}

.profile-tabs .icon-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-tabs .icon-btn:hover {
    transform: scale(1.1);
}

.profile-tabs .icon-btn.button-profile-selected {
    border-bottom: 4px var(--button) solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* TAB CONTENT ANIMATIONS */
.tab-content {
    display: none;
    animation: fadeSlideIn 0.3s ease-out forwards;
}

.tab-content.active {
    display: block;
    animation: fadeSlideIn 0.3s ease-out forwards;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

.tab-content.slide-left {
    animation: fadeSlideOut 0.2s ease-in forwards;
}

.tab-content.slide-right {
    animation: fadeSlideOut 0.2s ease-in forwards;
}

/* TAB SWIPE CONTAINER */
.tab-swipe-container {
    overflow: hidden;
    position: relative;
}

/* BOTÃO CLARO */
.btn-secondary {
    background: var(--secondary-color);
    color: var(--button);
}

/* BOTÃO PRINCIPAL */
.btn-primary {
    background: var(--primary-color);
    color: white;
}

/* EFEITO HOVER */
.btn:hover {
    transform: scale(1.05);
}

/* FORMULÁRIO */
.form-box {
    width: 100%;
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* TÍTULO */
.form-header h1 {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 5px;
}

.form-header p {
    font-size: 13px;
    color: var(--on-button);
}

/* CAMPOS */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 13px;
    color: var(--on-div);
}

/* INPUT BASE */
.form-group input {
    background: var(--on-button);
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
}

/* FOCO */
.form-group input:focus {
    background: var(--on-div);
    box-shadow: 0 0 0 2px var(--primary-color);
}

/* FOOTER FIXO */
.form-footer {
    position: fixed;
    bottom: 20px;
    width: 100%;
    max-width: 420px;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

/* CATEGORIAS */
.categories-box {
    width: 100%;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* TÍTULO DA CATEGORIA */
.category h3 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--on-background);
}

/* GRUPO DE CHIPS */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* CHIP BASE */
.chip {
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--secondary-color);
    color: #333;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}

/* CHIP SELECIONADO */
.chip.selected {
    background: var(--primary-color);
    color: white;
}

/* HOVER */
.chip:hover {
    transform: scale(1.05);
}

.action-card{
    margin-top: 34px;
    color: var(--on-background);
}

.top-bar-tree{
    width: 100%;
    display: grid;
    grid-template-columns: 25% 50% 25%;
}

/* HEADER */
.app-header {
    position: sticky;
    top: 0px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: var(--background-app);
    border-bottom: 1px solid var(--on-div);
}

.app-title {
    font-size: 16px;
    font-weight: 600;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

/* FEED */
.feed {
    padding: 16px;
    padding-bottom: 90px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* POST */
.post-card{
    background: var(--background-app);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-user {
    display: flex;
    flex-direction: column;
}

.post-user span {
    font-size: 12px;
    color: #777;
}

/* AVATAR */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--on-div);
}

/* TEXTO */
.post-text{
    font-size: 14px;
    line-height: 1.5;
    color: var(--on-background);
}

/* MIDIA */
.post-card img,
.post-card video{
    width: 100%;
    border-radius: 14px;
    margin-top: 10px;
}

hr{
    border: none;
    height: 1px;
    background: var(--on-div);
    opacity: 0.3;
}

.feed{
    gap: 22px;
}

.media-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: #d2c8e8;
}

/* SUGESTÕES */
.suggestions-section h3 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 12px;
}

.suggestions {
    display: flex;
    gap: 22px;
}

.suggestion-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

/* AVATARES SUGESTÃO */
.suggest-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #ccc;
}

.avatar-a {
    background: linear-gradient(135deg, #ff9800, #ff5722);
}

.avatar-b {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
}

/* LOAD MORE BUTTON */
#load-more-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    gap: 15px;
}

.load-more-btn {
    background: var(--button);
    color: var(--on-button);
    border: none;
    padding: 12px 32px;
    border-radius: var(--btn-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.load-more-btn:hover {
    opacity: 0.9;
}

.load-more-btn:active {
    transform: scale(0.98);
}

.loading-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--on-background);
    font-size: 14px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--on-div);
    border-top-color: var(--button);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* BOTTOM NAV */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    height: 64px;
    background: var(--background-app);
    border-top: 1px solid var(--on-div);
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.nav-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
}
/* CREATE POST */
.create-post {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
}

/* HEADER ESPECÍFICO */
.post-header-bar {
    border-bottom: 1px solid #eee;
}

/* TÍTULO DO POST */
.post-title-input {
    border: none;
    font-size: 16px;
    font-weight: 500;
    padding: 6px 0;
    outline: none;
    background: transparent;
    color: var(--on-background);
}

/* TIPO DE POST */
.post-type {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
}

.post-type-tabs {
    display: flex;
    gap: 24px;
}

/* TABS */
.post-tab {
    background: none;
    border: none;
    font-size: 18px;
    padding-bottom: 4px;
    cursor: pointer;
    color: var(--on-button);
    position: relative;
}

/* TAB ATIVA */
.post-tab.active {
    color: var(--on-div);
    font-weight: 500;
}

.post-tab.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: var(--primary-color);
    border-radius: 2px;
}

/* CORPO DO POST */
.post-body {
    flex: 1;
    border: 2px solid var(--on-button);
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    resize: none;
    outline: none;
    color: var(--on-background);
    background: transparent;
}

/* FOOTER FIXO */
.post-footer {
    position: fixed;
    bottom: 20px;
    width: 100%;
    max-width: 420px;
    padding: 0 16px;
    display: flex;
    justify-content: flex-end;
    right: 6px;
}

/* CONTAINER DOS PAINÉIS */
.post-content {
    flex: 1;
    position: relative;
    margin-bottom: 64px;
}

/* PAINÉIS */
.post-panel {
    display: none;
    height: 100%;
}

.post-panel.active {
    display: block;
}

/* CAIXA DE MIDIA */
.media-box {
    height: 100%;
}

/* PLACEHOLDER */
.media-placeholder {
    height: 100%;
    border: 2px solid var(--on-button);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: var(--on-button);
    text-align: center;
    cursor: pointer;
}

/* ÍCONE + */
.media-plus {
    font-size: 48px;
    font-weight: 300;
}

/* PREVIEW DE IMAGEM/VIDEO */
.media-preview {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: var(--background);
    display: none;
}

.media-preview.active {
    display: block;
}

.media-preview img,
.media-preview video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.remove-media {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.remove-media:hover {
    background: rgba(255, 0, 0, 0.8);
}

.new-post-button{
    position: fixed;
    bottom: 84px;
    right: 24px;
    border: none;
    padding: 12px;
    border-radius: 12px;
    background-color: var(--on-button);
}

.new-notification-button{
    position: fixed;
    bottom: 154px;
    right: 24px;
    border: none;
    padding: 12px;
    border-radius: 12px;
    background-color: var(--on-button);
    animation: tilt-shaking 300ms;
    animation-iteration-count: infinite;
}

@keyframes tilt-shaking {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(5deg); }
  50% { transform: rotate(0eg); }
  75% { transform: rotate(-5deg); }
  100% { transform: rotate(0deg); }
}

.user-mini-info{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: center;
}

.user-mini-info .avatar{
    width: 96px;
    height: 96px;
    border-radius: 50%;
}

.user-mini-info strong{
    font-size: 18px;
    font-weight: 600;
}

.user-mini-info span span{
    font-size: 13px;
    color: var(--on-button);
}

.button-profile-selected{
    border-bottom: 2px var(--button) solid; 
}

a{
    color: var(--on-background);
    text-decoration: none;
}

.option-name{
    display: grid;
    grid-template-columns: 95% 10%;
}

.option-name svg{
    margin-top: 50%;
}

.profile-tabs{
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-top: 16px;
    padding-bottom: 6px;
}

.profile-tabs .icon-btn{
    padding: 8px;
    opacity: 0.6;
    transition: 0.2s;
}

.profile-tabs .icon-btn:hover{
    opacity: 1;
}

.button-profile-selected{
    opacity: 1 !important;
    border-bottom: 3px solid var(--button);
}

/* Profile Picture Container */
.profile-pic-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    background-color: var(--secondary-bg);
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.avatar-preview:hover {
    transform: scale(1.05);
    border-color: var(--button);
}

#profileImage {
    display: none;
}

/* TELA DE TEMAS */
.theme-selector {
    gap: 24px;
}

/* PREVIEW GRANDE */
.theme-preview {
    background: #ede8f2;
    border-radius: 20px;
    padding: 6px;
    display: flex;
    justify-content: center;
}

.theme-preview-inner {
    width: 100%;
    height: 260px;
    background: #f1ecf6;
    border-radius: 20px;
    position: relative;
}

/* FORMAS */
.shape {
    position: absolute;
    background: #cfcad6;
}

.shape.triangle {
    width: 70px;
    height: 70px;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.shape.gear {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    bottom: 60px;
    left: 80px;
}

.shape.square {
    width: 55px;
    height: 55px;
    border-radius: 10px;
    bottom: 60px;
    right: 80px;
}

/* OPÇÕES */
.theme-options {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    padding: 10px 15px;
    box-sizing: border-box;
}

.theme-options::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
}

.theme-thumb {
    width: 90px;
    height: 90px;
    position: relative;
    border-radius: 10px;
}

.theme-thumb img{
    width: 90px;
    height: 90px;
    border-radius: 10px;
}

.theme-thumb .shape {
    background: #cfcad6;
    transform: scale(0.6);
}

/* TEMA ATIVO */
.theme-option.active span {
    font-weight: 600;
}

/* VARIAÇÃO LARANJA */
.theme-thumb.orange {
    background: #fff1e6;
}

.theme-thumb.orange .shape {
    background: #ffb870;
}

/* PWA Push Notifications */
.enable-notifications-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
    margin-left: 10px;
}

.enable-notifications-btn:hover {
    background: var(--primary-hover, var(--primary));
    opacity: 0.9;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg, #333);
    color: var(--text-color, white);
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
