@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --gold-primary: #d4af37;
    --gold-hover: #b5952f;
    --gold-light: #f9f5e8;
    --text-main: #1a1a1a;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
    --shadow-sm: 0 4px 6px -1px rgba(212, 175, 55, 0.05), 0 2px 4px -1px rgba(212, 175, 55, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(212, 175, 55, 0.1), 0 4px 6px -2px rgba(212, 175, 55, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(212, 175, 55, 0.15), 0 10px 10px -5px rgba(212, 175, 55, 0.04);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .brand-logo {
    font-family: 'Playfair Display', serif;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse-heart {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding: 1rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

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

.brand-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-logo i {
    color: var(--gold-primary);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--gold-primary);
}

/* Base Components Structure */
.container {
    max-width: 800px; /* Blog feed focused width */
    margin: 2rem auto;
    padding: 0 1.5rem;
    flex-grow: 1;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(212, 175, 55, 0.3);
}

/* Forms & Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-hover) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    position: relative;
    overflow: hidden;
}

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

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    background-size: 200% 100%;
}

.btn-primary:hover::before {
    animation: shimmer 1.5s infinite;
}

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

.btn-outline:hover {
    background: var(--gold-light);
}

.form-group {
    margin-bottom: 1.2rem;
    position: relative;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--card-bg);
    color: var(--text-main);
}

.form-control:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

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

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Posts / Feed Styling */
.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold-light);
    background: var(--bg-color);
    color: var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: var(--text-main);
}

.post-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-main);
    text-decoration: none;
}

.post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: var(--gold-primary);
}

.post-content {
    color: var(--text-main);
    margin-bottom: 1.5rem;
    word-wrap: break-word;
}

.post-actions {
    display: flex;
    gap: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn i {
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.action-btn:hover {
    color: var(--gold-primary);
}

.action-btn:hover i {
    transform: translateY(-2px);
}

.action-btn.liked {
    color: #e63946;
}

.action-btn.liked i {
    animation: pulse-heart 0.4s ease-out;
}

.action-btn.shared {
    color: var(--gold-primary);
}

/* Auth Pages */
.auth-container {
    max-width: 400px;
    margin: 4rem auto;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-muted);
}

/* Flash Messages */
.flash-msg {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    background: var(--gold-light);
    color: var(--gold-hover);
    border: 1px solid var(--gold-primary);
    text-align: center;
    font-weight: 500;
}

.flash-error {
    background: #ffeeee;
    color: #e63946;
    border: 1px solid #ffcccc;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: auto;
}

/* Profile specific */
.profile-header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    font-size: 2rem;
}

.shared-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--gold-light);
    color: var(--gold-hover);
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Comment Section */
.comment-section {
    margin-top: 2rem;
}

.comment {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #fdfdfd;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.comment .avatar {
    width: 36px;
    height: 36px;
}

.comment-content {
    flex-grow: 1;
}

.comment-author {
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
}

.comment-time {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: normal;
}

.comment-text {
    font-size: 0.95rem;
    margin-top: 0.3rem;
}

/* Create Post Box specific */
.create-post-box form textarea {
    border: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    padding: 0.5rem 0;
    box-shadow: none;
}
.create-post-box form textarea:focus {
    border-bottom: 2px solid var(--gold-primary);
    box-shadow: none;
}
.create-post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}
