/* Notas de seguidores */
.note-follower {
    border: 2px solid #ff9800;
    box-shadow: 0 2px 12px rgba(255, 152, 0, 0.08);
    background: linear-gradient(90deg, #fffbe6 0%, #fff3e0 100%);
}
.privacy-follower {
    background-color: #ff9800;
    color: #fff;
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}
/* Variables CSS para consistencia */
:root {
    --primary-color: #2196F3;
    --primary-dark: #1976D2;
    --secondary-color: #FFC107;
    --background-color: #f5f5f5;
    --surface-color: #ffffff;
    --text-primary: #212121;
    --text-secondary: #757575;
    --border-color: #e0e0e0;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 8px rgba(0,0,0,0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Header */
/* Header mejorado para alineación */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 16px 32px;
}
.header .left {
    flex: 1;
}
.header .right {
    flex: 1;
    text-align: right;
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-links a:hover {
    background-color: var(--background-color);
}

.nav-links .btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.nav-links .btn-primary:hover {
    background-color: var(--primary-dark);
}

/* Mobile menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Container principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    margin-top: 20px;
}

/* Sidebar */
.sidebar {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 84px;
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    gap: 18px;
}

.sidebar h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-menu a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: var(--primary-color);
    color: white;
}

/* Content area */
.content {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

/* Formularios */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--text-secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: #555;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover,
.btn-selected {
    background-color: var(--primary-color);
    color: white;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

/* Cards y Notes */
.note-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.note-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.note-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.note-meta {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    gap: 10px;
    align-items: center;
}

.note-content {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 15px;
}

.note-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Privacy badges */
.privacy-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.privacy-public {
    background-color: #4CAF50;
    color: white;
}

.privacy-friends {
    background-color: #FF9800;
    color: white;
}

.privacy-followers {
    background-color: var(--primary-color);
    color: white;
}

.privacy-private {
    background-color: #757575;
    color: white;
}

/* Comentarios */
.comments-section {
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.comment {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 15px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
}

.comment-date {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Loading y Estados */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state h3 {
    margin-bottom: 10px;
}

/* Alertas */
.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}

/* Paginación */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.pagination button:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .current-page {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface-color);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
    }
    
    .nav-links.show {
        display: flex;
    }
    
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2;
        position: static;
    }
    
    .container {
        padding: 10px;
    }
    
    .note-card {
        padding: 15px;
    }
    
    .note-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .note-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .nav {
        padding: 0 10px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .modal-content {
        padding: 20px;
        margin: 10px;
    }
}

/* Utilidades */
.text-center, .center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    display: block;
}
.text-right { text-align: right; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-10 { gap: 10px; }

/* Minimalist button styles for logout/login/register */
.btn-logout,
#logoutBtn,
a[href="/logout.php"] {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    background: #e53935;
    border: 1px solid rgba(0,0,0,0.06);
    text-decoration: none;
    cursor: pointer;
    transition: opacity 120ms ease, background 120ms ease;
}

.btn-logout:focus,
#logoutBtn:focus,
a[href="/logout.php"]:focus {
    outline: 2px solid rgba(229,57,53,0.14);
    outline-offset: 2px;
}

.btn-logout:hover,
#logoutBtn:hover,
a[href="/logout.php"]:hover {
    opacity: 0.9;
}

.btn-login,
#loginBtn,
a[href="/login.php"] {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    background: #1e88e5;
    border: 1px solid rgba(0,0,0,0.04);
    text-decoration: none;
    cursor: pointer;
    transition: opacity 120ms ease, background 120ms ease;
}

.btn-login:focus,
#loginBtn:focus,
a[href="/login.php"]:focus {
    outline: 2px solid rgba(30,136,229,0.14);
    outline-offset: 2px;
}

.btn-login:hover,
#loginBtn:hover,
a[href="/login.php"]:hover {
    opacity: 0.95;
}

.btn-register,
#registerBtn,
a[href="/register.php"] {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    background: #43a047;
    border: 1px solid rgba(0,0,0,0.04);
    text-decoration: none;
    cursor: pointer;
    transition: opacity 120ms ease, background 120ms ease;
}

.btn-register:focus,
#registerBtn:focus,
a[href="/register.php"]:focus {
    outline: 2px solid rgba(67,160,71,0.14);
    outline-offset: 2px;
}

.btn-register:hover,
#registerBtn:hover,
a[href="/register.php"]:hover {
    opacity: 0.95;
}

/* Small variants */
.btn-login.small, #loginBtn.small, a[href="/login.php"].small,
.btn-register.small, #registerBtn.small, a[href="/register.php"].small,
.btn-logout.small, #logoutBtn.small, a[href="/logout.php"].small {
    padding: 6px 8px;
    font-size: 13px;
}

/* Minimalist login form styles */
.login-page .login-container {
    position: fixed;
    inset: 0; /* top:0; right:0; bottom:0; left:0 */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    /* prevent body scroll behind the centered card */
}

/* When not on login page, keep original flow */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 0;
}

/* Sticky colored footer */
.site-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-dark);
    color: white !important;
    padding: 12px 16px;
    text-align: center;
    z-index: 1000;
}

.site-footer a { color: rgba(255,255,255,0.95); text-decoration: underline; }

/* Ensure main content above footer has enough bottom padding */
.container { padding-bottom: 80px; }

.login-card {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(180deg, var(--surface-color), rgba(245,245,245,0.98));
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 22px;
    box-shadow: var(--shadow);
    position: relative;
}

.login-card h2 {
    margin-bottom: 12px;
    font-size: 20px;
    color: var(--text-primary);
}

.login-card label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 13px;
}

.login-card input[type="text"],
.login-card input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.login-card input[type="text"]:focus,
.login-card input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(33,150,243,0.06);
}

.login-card button[type="submit"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: none;
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 120ms ease;
}

.login-card button[type="submit"]:hover {
    background: var(--primary-dark);
    opacity: 0.98;
}

.login-container #mensaje {
    margin-top: 10px;
    color: #b00020;
    font-size: 14px;
}

/* Accent bar on top of card */
.login-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
}
