/* style.css - Twitter Yuly Design System */
:root {
    --primary: #007AFF;
    /* Azul iOS Premium */
    --primary-soft: rgba(0, 122, 255, 0.1);
    --bg: #F2F2F7;
    --card-bg: rgba(255, 255, 255, 0.75);
    --text: #1C1C1E;
    --text-muted: #8E8E93;
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Efecto de luz difusa en el fondo */
.blob-bg {
    position: fixed;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-soft) 0%, transparent 70%);
    filter: blur(60px);
    z-index: -1;
}

header {
    position: sticky;
    top: 0;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    background: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.2rem;
    text-align: center;
    z-index: 100;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(45deg, var(--primary), #5856D6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

main {
    padding: 1.5rem 1rem;
    padding-bottom: 7rem;
    max-width: 650px;
    margin: 0 auto;
}

/* Transiciones SPA */
.view {
    display: none;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.view.active {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Tarjetas de Posts (Glassmorphism) */
.post-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1.5rem;
    margin-bottom: 1.2rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Post DESTACADO (Amarillo Premium) */
.post-card.featured {
    background: rgba(255, 204, 0, 0.15);
    /* Fondo amarillento suave */
    border: 2px solid rgba(255, 204, 0, 0.4);
    /* Borde dorado */
    box-shadow: 0 8px 32px 0 rgba(255, 204, 0, 0.1);
}

.post-card:active {
    transform: scale(0.985);
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.post-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Botones con estilo Premium */
.btn-like {
    border: none;
    background: var(--primary-soft);
    color: var(--primary);
    padding: 10px 18px;
    border-radius: 99px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.btn-like:active {
    background: rgba(0, 122, 255, 0.2);
}

.btn-delete {
    border: none;
    background: rgba(255, 59, 48, 0.1);
    color: #FF3B30;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
}

.btn-star {
    border: none;
    background: rgba(255, 204, 0, 0.15);
    color: #FFCC00;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
}

.btn-star.active {
    background: #FFCC00;
    color: white;
}

/* Formulario de creación */
.composer-card {
    background: white;
    padding: 2rem;
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.composer-card h2 {
    margin-bottom: 1.5rem;
    font-weight: 800;
    color: #000;
}

textarea {
    width: 100%;
    min-height: 200px;
    border: 1px solid #E5E5EA;
    border-radius: 18px;
    padding: 1.2rem;
    font-family: inherit;
    font-size: 1.1rem;
    resize: none;
    outline: none;
    background: #F2F2F7;
    transition: all 0.3s;
}

textarea:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.composer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 1.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

.btn-secondary {
    background: #E5E5EA;
    color: #3A3A3C;
    border: none;
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

/* Menú Navegación Inferior */
#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    padding: 1rem 0;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    z-index: 100;
}

.nav-item {
    text-decoration: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    flex: 1;
}

.nav-item.active {
    color: var(--primary);
    transform: translateY(-2px);
}

.nav-item .icon {
    font-size: 1.6rem;
}

.nav-item .label {
    font-size: 0.75rem;
    font-weight: 700;
}

.loading {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem;
    font-size: 1.1rem;
    font-weight: 500;
}