@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&family=Lato:wght@400;700&display=swap');

:root {
    --bs-primary: #0A749A;
    --bs-secondary: #2E9599;
    --accent-color: #F2C14E;
    --neutral-light: #F8F9FA;
    --neutral-dark-text: #343A40;
    --neutral-dark-bg: #212529;

    --bs-primary-rgb: 10, 116, 154;
    --bs-secondary-rgb: 46, 149, 153;
    --bs-body-color: var(--neutral-dark-text);
    --bs-body-bg: var(--neutral-light);
    --bs-font-sans-serif: 'Lato', sans-serif;
    --headings-font-family: 'Poppins', sans-serif;
    --bs-border-radius: 0.5rem;
    --bs-border-radius-lg: 0.8rem;
    --bs-border-radius-sm: 0.3rem;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.07);
}

html, body {
    overscroll-behavior: none;
}

body {
    font-family: var(--bs-font-sans-serif);
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    padding-top: 80px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Typographic Scale */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--headings-font-family);
    font-weight: 700;
    color: var(--neutral-dark-text);
}

h1 { font-size: 2.5rem; margin-bottom: 2rem; }
h2 { font-size: 2rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.75rem; margin-bottom: 1.5rem; }
p { font-size: 1rem; line-height: 1.6; margin-bottom: 1rem; }
small { font-size: 0.875rem; }

/* Shared Components Styling */

/* Frosted Glass Navbar */
.navbar-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700;
    font-size: 1.5rem;
    color: #34495E !important;
}

.nav-link {
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    color: #34495E !important;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #8E44AD !important;
}

#logout-link {
    color: #dc3545 !important;
}

#logout-link:hover {
    color: #a71d2a !important;
}

/* Button Styling */
.btn {
    border-radius: var(--bs-border-radius);
    padding: 0.6rem 1.5rem;
    font-weight: 700;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background-image: linear-gradient(to right, var(--bs-primary) 0%, var(--bs-secondary) 100%);
    color: var(--neutral-light);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: #fff;
}

.btn-outline-primary {
    color: var(--bs-primary);
    border: 2px solid var(--bs-primary);
}

.btn-outline-primary:hover {
    background-color: var(--bs-primary);
    color: var(--neutral-light);
}

.btn-secondary {
    background-color: var(--bs-secondary);
    color: var(--neutral-light);
}

.btn-secondary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Conditional Auth View Styles */
body.logged-in .logged-out-view {
  display: none !important;
}

body.logged-in .logged-in-view {
  display: flex !important;
}

/* Footer Styling */
.site-footer {
    background-color: #212529;
    color: #F8F9FA;
    padding: 2rem 0;
    margin-top: auto;
}

.site-footer a {
    color: #F2C14E;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: #F8F9FA;
    text-decoration: underline;
}

/* Node-specific styles below */

/* Refined Glassmorphic Cards */
.card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--bs-primary), #4a627a);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4a627a, var(--bs-primary));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 73, 94, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--bs-secondary), #9b59b6);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #9b59b6, var(--bs-secondary));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(142, 68, 173, 0.3);
}

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

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

/* Form Elements */
.form-control {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #e0e0e0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--bs-secondary);
    box-shadow: 0 0 0 4px rgba(142, 68, 173, 0.1);
    background-color: #fff;
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--bs-neutral-dark-text);
}

/* Specific Component Styles */
.profile-header-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bs-accent), var(--bs-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(52, 73, 94, 0.1);
}

.stock-badge {
    background-color: rgba(26, 188, 156, 0.1);
    color: var(--bs-accent);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-card-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #7f8c8d;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Tab Styling */
.nav-tabs {
    border-bottom: 2px solid rgba(52, 73, 94, 0.1);
}

.nav-tabs .nav-link {
    color: var(--bs-primary);
    font-weight: 600;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
    color: var(--bs-secondary);
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--bs-secondary);
    background-color: transparent;
    border-color: transparent;
    border-bottom-color: var(--bs-secondary);
}

/* Stock tag link styling */
.stock-tag-link {
    display: inline-block;
    background-color: rgba(26, 188, 156, 0.1);
    color: var(--bs-accent);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.stock-tag-link:hover {
    background-color: rgba(26, 188, 156, 0.25);
    color: var(--bs-accent);
    text-decoration: none;
}

/* Comment card styling */
.comment-card {
    border-left: 3px solid var(--bs-secondary);
}

/* Post link styling */
.post-link {
    color: var(--bs-primary);
    text-decoration: none;
    font-weight: 500;
}

.post-link:hover {
    color: var(--bs-secondary);
    text-decoration: underline;
}

/* Light red unfollow button */
.btn-outline-danger-light {
    border: 1px solid #f5c6cb;
    color: #dc3545;
    background-color: transparent;
}

.btn-outline-danger-light:hover {
    border-color: #dc3545;
    background-color: #dc3545;
    color: #fff;
}