:root {
    --bg-color: #0d1117;
    --card-bg: rgba(22, 27, 34, 0.7);
    --text-color: #e6edf3;
    --accent: #58a6ff;
    --danger: #f85149;
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

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

#app {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0 0 16px 16px;
    margin-bottom: 1rem;
}

h1 {
    font-size: 1.5rem;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(45deg, var(--accent), #bc8cff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
}

.btn-plus {
    background: var(--accent);
    color: white;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.5rem;
}

#view-container {
    padding: 1rem;
    flex: 1;
}

/* --- ANIMACIONES --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* --- UI COMPONENTS --- */
.card {
    padding: 1.5rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.post-content {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    white-space: pre-wrap;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #8b949e;
}

.post-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: opacity 0.2s;
}

.action-btn:active {
    transform: scale(0.9);
}

.btn-like {
    color: #f85149;
}

.btn-delete {
    color: #8b949e;
}

/* --- FORMULARIO --- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

textarea {
    width: 100%;
    min-height: 150px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    padding: 1rem;
    font-family: inherit;
    font-size: 1.1rem;
    resize: none;
}

textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:active {
    transform: scale(0.98);
}

.loading-spinner {
    text-align: center;
    padding: 3rem;
    color: var(--accent);
    font-weight: 600;
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
    header {
        margin: 0.5rem;
        border-radius: 16px;
    }
}