@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Oswald:wght@600;700&display=swap');

:root {
    --bg-color: #07090e;
    --surface-color: #0f1420;
    --surface-card: #141c2e;
    --surface-accent: #1e293b;
    --border-color: #26334d;
    
    --fet-red: #e11d48;
    --fet-red-hover: #f43f5e;
    
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;

    /* Compatibility variables */
    --bg-main: #07090e;
    --bg-card: #141c2e;
    --bg-card-hover: #1b263e;
    --accent-red: #e11d48;
    --accent-red-hover: #f43f5e;
    --accent-red-glow: rgba(225, 29, 72, 0.35);
    --text-main: #f1f5f9;
    --glass-bg: #141c2e;
    --glass-border: #26334d;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

html {
    background-color: #07090e !important;
    background: #07090e !important;
    color-scheme: dark !important;
}

body {
    background-color: #07090e !important;
    background: #07090e !important;
    color: var(--text-color);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    padding-bottom: 30px;
    margin: 0;
    min-height: 100vh;
    width: 100%;
}

/* Base Headings */
h1, h2, h3, h4, h5, h6, .logo-text {
    color: #f8fafc !important;
    font-family: 'Oswald', 'Inter', sans-serif;
    letter-spacing: -0.3px;
}

/* Main Layout Container */
.container {
    width: 100%;
    padding-right: 20px;
    padding-left: 20px;
    margin-right: auto;
    margin-left: auto;
    box-sizing: border-box;
    background-color: #0b101d !important;
    border: 1px solid #1e293b !important;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; padding: 24px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; margin-top: 24px; margin-bottom: 24px; } }

/* Header & Navigation */
header.main-header {
    background-color: #0f172a !important;
    border-bottom: 2px solid var(--fet-red);
    padding: 16px 24px;
    border-radius: 8px 8px 0 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-group-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background-color: var(--fet-red);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    color: white;
    font-size: 22px;
}

.logo-text {
    font-family: 'Oswald', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
}

.logo-text span {
    color: var(--fet-red);
}

nav.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 15px;
}

nav a, .nav-link {
    color: #cbd5e1 !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

nav a:hover, .nav-link:hover {
    color: #ffffff !important;
    background-color: #1e293b;
    border-color: #334155;
}

nav a.active, .nav-link.active {
    color: #ffffff !important;
    background-color: var(--fet-red) !important;
    border-color: var(--fet-red);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* Compact Language Selector Dropdown */
.lang-select-box {
    width: auto !important;
    max-width: 95px !important;
    padding: 4px 8px !important;
    font-size: 13px !important;
    height: 36px !important;
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #ffffff !important;
    cursor: pointer;
    border-radius: 6px !important;
    font-weight: 600;
    box-sizing: border-box;
}

/* Dark Layout Panels, Cards & Groups */
.glass-card, .card, .group-card, .event-card, .post {
    background-color: #141c2e !important;
    border: 1px solid #26334d !important;
    color: #f1f5f9 !important;
    padding: 24px;
    margin-bottom: 24px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Hero Section Layout */
.hero-card {
    background: linear-gradient(135deg, #141c2e 0%, #0b101d 100%) !important;
    border: 1px solid #26334d !important;
    border-bottom: 3px solid var(--fet-red) !important;
    padding: 35px !important;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 35px;
    align-items: center;
}

@media (max-width: 850px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title span.accent, span.accent {
    color: var(--fet-red);
}

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

label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input, input[type="text"], input[type="password"], input[type="email"], input[type="date"], input[type="time"], select, textarea, .form-control, .form-select {
    background-color: #0f172a !important;
    border: 1px solid #374151 !important;
    border-radius: 6px !important;
    padding: 10px 12px !important;
    color: #ffffff !important;
    font-family: inherit !important;
    font-size: 14px !important;
    color-scheme: dark !important;
}

/* Placeholder visibility fix */
::placeholder,
::-webkit-input-placeholder,
::-moz-placeholder,
:-ms-input-placeholder,
:-moz-placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

input:focus, select:focus, textarea:focus, .form-control:focus, .form-select:focus {
    outline: none !important;
    background-color: #1e293b !important;
    border-color: var(--fet-red) !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(225, 29, 72, 0.3) !important;
}

/* Chrome/Safari AutoFill Dark Fix */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0px 1000px #0f172a inset !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

/* Standard Buttons */
.btn, .btn-primary, a.btn, a.btn-primary, button.btn {
    background-color: var(--fet-red) !important;
    color: #ffffff !important;
    border: 1px solid #be123c !important;
    border-radius: 6px !important;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.btn:hover, .btn-primary:hover {
    background-color: var(--fet-red-hover) !important;
    color: #ffffff !important;
    border-color: #f43f5e !important;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #1e293b !important;
    color: #f3f4f6 !important;
    border: 1px solid #374151 !important;
    border-radius: 6px !important;
    box-shadow: none;
}

.btn-secondary:hover {
    background-color: #334155 !important;
    color: #ffffff !important;
    border-color: #475569 !important;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: rgba(225, 29, 72, 0.15) !important;
    color: #f43f5e !important;
    border: 1px solid rgba(225, 29, 72, 0.4) !important;
    border-radius: 6px !important;
}

.btn-danger:hover {
    background-color: var(--fet-red) !important;
    color: #ffffff !important;
    border-color: var(--fet-red) !important;
}

.btn-sm {
    padding: 6px 14px !important;
    font-size: 13px !important;
    min-height: 36px !important;
    line-height: 1.2 !important;
    box-sizing: border-box;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    white-space: nowrap;
}

/* Badges */
.badge, .kink-badge, .user-tag {
    background-color: rgba(225, 29, 72, 0.1);
    color: #f43f5e;
    border: 1px solid rgba(225, 29, 72, 0.3);
    padding: 2px 6px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
}

.badge-dark {
    background-color: var(--surface-accent);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

/* Post Items styling */
.post {
    background-color: #111827;
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 15px;
    margin-bottom: 15px;
}

.post-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
}

.post-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.post-meta a {
    color: var(--fet-red);
    text-decoration: none;
    font-weight: 600;
}

.post-meta a:hover {
    text-decoration: underline;
}

.post-content {
    color: #d1d5db;
    font-size: 15px;
}

/* List views */
.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

.item-row:last-child {
    border-bottom: none;
}

.item-info h4 {
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.item-info p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Alert Boxes */
.alert {
    padding: 12px 20px;
    border-radius: 0;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert-danger, .alert-error {
    background: rgba(225, 29, 72, 0.15);
    border: 1px solid rgba(225, 29, 72, 0.4);
    color: #f43f5e;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
}

/* Image & Avatar sizing fixes */
img {
    max-width: 100%;
    height: auto;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.post-author-avatar {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px;
    min-height: 48px;
    max-width: 48px;
    max-height: 48px;
    border-radius: 50%;
    border: 2px solid var(--fet-red);
    object-fit: cover;
    flex-shrink: 0;
}

.comment-card {
    background-color: #111827;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--fet-red);
    padding: 15px;
    margin-bottom: 15px;
}

.avatar-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--fet-red);
    margin: 0 auto 15px;
}

.avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--fet-red);
    flex-shrink: 0;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Global Link Styles */
a {
    color: var(--fet-red);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--fet-red-hover);
}

/* Feed Layout & Sidebar Menu */
.feed-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 25px;
    align-items: start;
}

@media (max-width: 768px) {
    .feed-layout {
        grid-template-columns: 1fr;
    }
}

.sidebar-profile {
    text-align: center;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 20px;
}

.sidebar-menu {
    list-style: none;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    text-align: left;
}

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

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-color);
    background-color: #111827;
    border: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 13.5px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-menu li a:hover {
    background-color: var(--surface-accent);
    border-color: var(--fet-red);
    color: #ffffff;
    text-decoration: none;
    transform: translateX(4px);
}

/* Messaging Interface */
.messaging-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: 680px;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

@media (max-width: 768px) {
    .messaging-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
}

.conversations-sidebar {
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background-color: #111827;
}

.sidebar-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: #0b1120;
}

.sidebar-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    display: block;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-color);
    background-color: transparent;
    transition: background-color 0.2s ease;
}

.conversation-item:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

.conversation-item.active {
    background-color: rgba(225, 29, 72, 0.15) !important;
    border-left: 3px solid var(--fet-red);
}

.conversation-item.unread {
    background-color: rgba(225, 29, 72, 0.08);
}

.chat-window {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #0b1120;
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #111827;
}

.chat-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background-color: #0b0f17;
}

.message {
    max-width: 65%;
    padding: 12px 16px;
    border-radius: 0px;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

.message-sent {
    align-self: flex-end;
    background-color: var(--fet-red);
    color: #ffffff;
    border: 1px solid #be123c;
}

.message-sent .message-time {
    color: rgba(255, 255, 255, 0.7);
}

.message-received {
    align-self: flex-start;
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.message-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    display: block;
    text-align: right;
}

.chat-input-area {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background-color: #111827;
}

/* Profile Page Layout & Actions Menu */
.profile-cover {
    height: 180px;
    background: linear-gradient(135deg, rgba(225, 29, 72, 0.25) 0%, rgba(17, 24, 39, 0.95) 100%);
    border: 1px solid var(--border-color);
    border-bottom: 3px solid var(--fet-red);
}

.profile-header-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
    align-self: flex-end;
}

.profile-actions .btn {
    width: 100%;
    justify-content: center;
}

.profile-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

.profile-meta-tags span span {
    color: #ffffff;
    font-weight: 600;
}

.profile-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 25px;
}

@media (max-width: 768px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
    .profile-header-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .profile-actions {
        width: 100%;
    }
}

.btn-delete-post {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-delete-post:hover {
    background: var(--fet-red);
    color: #ffffff;
    border-color: var(--fet-red);
}

/* ==========================================
   MOBILE FIRST & RESPONSIVE DESIGN SYSTEM
   ========================================== */

/* Mobile Bottom Navigation Bar (App-like feel) */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #0f172a;
    border-top: 1px solid var(--border-color);
    z-index: 9999;
    justify-content: space-around;
    align-items: center;
    padding: 0 5px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
    backdrop-filter: blur(12px);
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    flex: 1;
    height: 100%;
    gap: 3px;
}

.mobile-bottom-nav a.active, .mobile-bottom-nav a:hover {
    color: var(--fet-red);
}

.mobile-bottom-nav a span.nav-icon {
    font-size: 20px;
    line-height: 1;
}

/* Mobile Layout Overrides (< 768px) */
@media (max-width: 768px) {
    body {
        padding-bottom: 70px; /* Space for bottom nav */
    }
    
    .mobile-bottom-nav {
        display: flex;
    }

    .main-header {
        padding: 10px 15px;
    }

    .header-inner {
        flex-wrap: wrap;
        gap: 10px;
    }

    .main-nav {
        display: none; /* Hidden on mobile, moved to bottom nav */
    }

    .logo-text {
        font-size: 20px;
    }

    .container {
        padding: 0 12px;
        width: 100%;
        box-sizing: border-box;
    }

/* Responsive Hero Card & Grid */
.hero-card {
    padding: 20px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    align-items: center;
}

@media (min-width: 768px) {
    .hero-card {
        padding: 40px;
    }
    .hero-grid {
        grid-template-columns: 1.2fr 0.8fr;
        gap: 40px;
    }
}

    /* Full width buttons on mobile */
    .btn {
        min-height: 44px; /* Touch friendly */
    }

    /* Inputs touch optimization */
    input, select, textarea {
        font-size: 16px !important; /* Prevents iOS auto-zoom */
        min-height: 44px;
    }
}


/* High Contrast Placeholders */
::placeholder {
    color: #cbd5e1 !important;
    opacity: 0.85 !important;
}

:-ms-input-placeholder {
    color: #cbd5e1 !important;
    opacity: 0.85 !important;
}

::-ms-input-placeholder {
    color: #cbd5e1 !important;
    opacity: 0.85 !important;
}

input::placeholder, textarea::placeholder {
    color: #cbd5e1 !important;
    opacity: 0.85 !important;
}
