/* ============================================
   RodosLounge.eu - Main Stylesheet
   Premium, relaxed lounge aesthetic
   ============================================ */

/* --- Reset & Variables --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #0f0f1a;
    --bg-alt: #1a1a2e;
    --bg-card: #1e1e38;
    --bg-input: #252545;
    --text: #e8e8f0;
    --text-muted: #8888aa;
    --text-dim: #6666aa;
    --accent: #c8a45c;
    --accent-hover: #dbb86c;
    --accent-dim: #8a7a4c;
    --border: #2a2a4a;
    --success: #4caf7a;
    --error: #e06060;
    --gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --max-width: 1200px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* --- Navigation --- */
.navbar {
    background: rgba(15,15,26,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}
.nav-logo:hover { opacity: .85; color: var(--text); }
.logo-icon { font-size: 1.5rem; }
.logo-text { font-size: 1.2rem; letter-spacing: 0.5px; }
.logo-accent { color: var(--accent); font-weight: 700; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}
.nav-links a {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all .2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); background: var(--bg-alt); }
/* --- User Dropdown --- */
.nav-user { position: relative; }
.nav-user a { display: flex; align-items: center; gap: 6px; }
.user-avatar img { border-radius: 50%; }
.user-name { font-size: .85rem; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.user-dropdown-toggle {
    padding: 6px 12px !important;
    border-radius: var(--radius-sm) !important;
    cursor: pointer;
    user-select: none;
}
.user-dropdown-toggle:hover { background: var(--bg-alt) !important; }
.dropdown-arrow { font-size: .6rem; color: var(--text-dim); transition: transform .2s; }
.dropdown-arrow.open { transform: rotate(180deg); }

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 200;
    overflow: hidden;
}
.user-dropdown.open { display: block; }

.dropdown-header {
    padding: 14px 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dropdown-name { font-weight: 600; font-size: .85rem; }
.dropdown-email { font-size: .75rem; color: var(--text-dim); }

.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

.dropdown-item {
    display: block;
    padding: 10px 16px;
    font-size: .85rem;
    color: var(--text-muted) !important;
    transition: all .15s;
    border-radius: 0 !important;
}
.dropdown-item:hover {
    background: var(--bg-alt) !important;
    color: var(--text) !important;
}
.dropdown-logout:hover { color: var(--error) !important; }

/* --- Mobile nav items override for dropdown items --- */
@media (max-width: 768px) {
    .user-dropdown {
        position: static;
        box-shadow: none;
        border: none;
        background: transparent;
        padding-left: 16px;
    }
    .user-dropdown.open { display: block; }
    .dropdown-item { padding: 8px 16px; }
    .dropdown-header { padding: 8px 16px; }
}

.nav-toggle { display: none; cursor: pointer; font-size: 1.5rem; color: var(--text); }

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background: var(--accent);
    color: #000;
    font-weight: 600;
    font-size: .9rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}
.btn-primary:hover { background: var(--accent-hover); color: #000; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background: transparent;
    color: var(--text);
    font-weight: 500;
    font-size: .9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 6px 16px; font-size: .8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-block { width: 100%; }

/* --- Hero --- */
.hero {
    text-align: center;
    padding: 100px 20px 80px;
    background: var(--gradient);
    border-bottom: 1px solid var(--border);
}
.hero-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.6;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* --- Sections --- */
.section { padding: 48px 0; }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.section-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
}
.section-link { font-size: .85rem; color: var(--text-muted); }
.section-link:hover { color: var(--accent); }

/* --- Cards --- */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-image { aspect-ratio: 16/9; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px; }
.card-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.card-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); }
.card-summary { font-size: .9rem; color: var(--text-muted); line-height: 1.5; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }

.category-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: .75rem;
    font-weight: 600;
    color: #000;
    background: var(--accent);
    border-radius: 20px;
}
.time { font-size: .78rem; color: var(--text-dim); }

.source-link { font-size: .8rem; color: var(--accent-dim); }
.source-link:hover { color: var(--accent); }
.read-more { font-size: .85rem; font-weight: 500; color: var(--accent); }

/* --- News List --- */
.news-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
.news-list { display: flex; flex-direction: column; gap: 16px; }
.news-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    gap: 16px;
    transition: all .2s;
}
.news-item:hover { border-color: var(--accent-dim); }
.news-item-body { flex: 1; }
.news-item-body h3 { font-size: .95rem; font-weight: 600; margin-bottom: 4px; }
.news-item-body h3 a { color: var(--text); }
.news-item-body h3 a:hover { color: var(--accent); }
.news-item-body p { font-size: .82rem; color: var(--text-muted); }
.news-item-thumb { width: 80px; height: 60px; flex-shrink: 0; border-radius: 6px; overflow: hidden; }
.news-item-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* --- JW Section --- */
.jw-section { background: var(--bg-alt); margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.jw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.jw-card {
    display: flex;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    transition: all .2s;
}
.jw-card:hover { border-color: var(--accent-dim); }
.jw-card-icon { font-size: 1.5rem; flex-shrink: 0; }
.jw-card-body h3 { font-size: .9rem; font-weight: 600; margin-bottom: 4px; }
.jw-card-body h3 a { color: var(--text); }
.jw-card-body p { font-size: .8rem; color: var(--text-muted); margin-bottom: 6px; }

/* --- Article Page --- */
.article {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 0;
}
.article-header { margin-bottom: 24px; }
.article-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.article-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 12px;
}
.article-source { font-size: .85rem; color: var(--text-muted); }
.article-image {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
}
.article-image img { width: 100%; }
.article-summary {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}
.article-summary h2 { font-size: 1rem; color: var(--accent); margin-bottom: 8px; }
.article-summary p { font-size: .95rem; line-height: 1.7; }
.article-body { font-size: 1rem; line-height: 1.8; }

/* --- Comments --- */
.comments-section { max-width: 800px; margin: 0 auto; padding: 48px 0; }
.comment-form { margin: 20px 0; }
.comment-form-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.comment-avatar { border-radius: 50%; }
.comment-user { font-weight: 600; font-size: .85rem; }
.comment-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: .9rem;
    resize: vertical;
    transition: border-color .2s;
}
.comment-form textarea:focus { outline: none; border-color: var(--accent-dim); }
.comment-form-actions { display: flex; justify-content: flex-end; margin-top: 8px; }

.comment-login-prompt {
    text-align: center;
    padding: 24px;
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
    margin: 20px 0;
}

.comments-list { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.comment {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
}
.comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.comment-body { font-size: .9rem; line-height: 1.5; }

/* --- Auth Pages --- */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 48px 20px;
}
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    position: relative;
}
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header h1 { font-family: var(--font-serif); font-size: 1.5rem; margin: 8px 0; }
.auth-header p { color: var(--text-muted); font-size: .9rem; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .85rem; font-weight: 500; }
.form-group small { font-size: .75rem; color: var(--text-dim); }

.form-input {
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: .9rem;
    transition: border-color .2s;
}
.form-input:focus { outline: none; border-color: var(--accent-dim); }
.form-input::placeholder { color: var(--text-dim); }

.form-checkbox { flex-direction: row; align-items: center; gap: 8px; }
.form-checkbox input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.form-checkbox label { font-size: .85rem; font-weight: 400; }

.auth-footer { text-align: center; margin-top: 20px; font-size: .85rem; color: var(--text-muted); }

/* --- Flash Messages --- */
.flash {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: .9rem;
    font-weight: 500;
}
.flash-success { background: rgba(76,175,122,0.15); border: 1px solid var(--success); color: var(--success); }
.flash-error { background: rgba(224,96,96,0.15); border: 1px solid var(--error); color: var(--error); }

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 32px;
    color: var(--text-dim);
    font-size: .9rem;
}

/* --- Error Page --- */
.error-page { text-align: center; padding: 100px 20px; }
.error-page h1 { font-family: var(--font-serif); font-size: 4rem; color: var(--accent); margin-bottom: 8px; }
.error-page p { color: var(--text-muted); margin-bottom: 24px; }

/* --- Footer --- */
.footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 48px 0 0;
    margin-top: 48px;
}
.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-desc { font-size: .85rem; color: var(--text-muted); }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links h4 { font-size: .8rem; font-weight: 600; color: var(--text); text-transform: uppercase; letter-spacing: 1px; }
.footer-links a { font-size: .85rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
    border-top: 1px solid var(--border);
    margin-top: 32px;
    padding: 16px 0;
    text-align: center;
}
.footer-bottom p { font-size: .8rem; color: var(--text-dim); }

/* --- JW Badge --- */
.jw-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: .75rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(200,164,92,0.1);
    border: 1px solid var(--accent-dim);
    border-radius: 20px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .news-grid-layout { grid-template-columns: 1fr; }
    .featured-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(15,15,26,0.98);
        border-bottom: 1px solid var(--border);
        padding: 16px;
        gap: 4px;
    }
    .nav-links.open { display: flex; }
    .article-title { font-size: 1.5rem; }
    .auth-card { padding: 24px; }
}

@media (max-width: 480px) {
    .hero { padding: 60px 16px 40px; }
    .section { padding: 32px 0; }
}
