/* ===========================
   Soulio - Styles
   =========================== */

* {
    font-family: 'Cairo', sans-serif;
}

:root {
    --primary: #8B1A1A;
    --primary-dark: #6B0F0F;
    --secondary: #C4A44A;
    --accent: #F5DEB3;
    --bg-dark: #1a0a0a;
    --bg-card: #2d1515;
    --text-light: #f8f0e8;
}

body {
    background-color: #f8f4f0;
    color: #2c1810;
}

/* ===== NAVBAR ===== */
#mainNav {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #6B3030 100%);
    box-shadow: 0 2px 20px rgba(139,26,26,0.4);
    padding: 0.7rem 0;
}

#mainNav .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 600;
    transition: color 0.2s;
}
#mainNav .nav-link:hover,
#mainNav .nav-link.active {
    color: var(--secondary) !important;
}

/* ===== HERO ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 40%, #8B4513 100%);
    min-height: 75vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(196,164,74,0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(245,222,179,0.05) 0%, transparent 50%);
    animation: bgPulse 8s ease-in-out infinite;
}
@keyframes bgPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.4);
}
.hero-subtitle {
    font-size: 1.2rem;
    color: var(--accent);
    opacity: 0.9;
}
.hero-pattern {
    position: absolute;
    right: 0;
    top: 0;
    width: 40%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C4A44A' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

/* ===== CARDS ===== */
.profile-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: #fff;
}
.profile-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(139,26,26,0.2);
}
.profile-card .card-img-top {
    height: 220px;
    object-fit: cover;
    background: #e8d5c5;
}
.profile-card .card-body {
    padding: 1.2rem;
}
.profile-card .card-title {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}
.profile-card .badge-custom {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.75rem;
}

/* ===== STATS SECTION ===== */
.stats-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 3rem 0;
}
.stat-box {
    text-align: center;
    color: white;
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary);
}

/* ===== FEATURE CARDS ===== */
.feature-card {
    border: none;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}
.feature-card:hover { transform: translateY(-5px); }
.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #C0392B);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.8rem;
    color: white;
}

/* ===== FORMS ===== */
.auth-card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(139,26,26,0.15);
    overflow: hidden;
}
.auth-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 2rem;
    text-align: center;
    color: white;
}
.auth-header h3 { font-weight: 800; }
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e8d5c5;
    padding: 0.6rem 1rem;
    transition: border-color 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(139,26,26,0.15);
}

/* ===== BUTTONS ===== */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.6rem 1.5rem;
    font-weight: 700;
    transition: all 0.3s;
}
.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--primary-dark), #4a0808);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139,26,26,0.4);
}
.btn-gold {
    background: linear-gradient(135deg, var(--secondary), #a88020);
    color: #2c1810;
    border: none;
    border-radius: 10px;
    font-weight: 700;
}
.btn-gold:hover {
    background: linear-gradient(135deg, #a88020, #7a5e10);
    color: #2c1810;
    transform: translateY(-2px);
}

/* ===== PROFILE PAGE ===== */
.profile-hero {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 3rem 0;
}
.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--secondary);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}
.info-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    background: #fff;
}
.info-card .card-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 16px 16px 0 0 !important;
    font-weight: 700;
    padding: 1rem 1.5rem;
}
.info-row {
    display: flex;
    align-items: center;
    padding: 0.7rem 0;
    border-bottom: 1px solid #f0e8e0;
}
.info-row:last-child { border-bottom: none; }
.info-label {
    font-weight: 600;
    color: var(--primary);
    width: 130px;
    flex-shrink: 0;
}
.info-value { color: #444; }

/* ===== MESSAGES ===== */
.conversation-item {
    border: none;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    padding: 0.8rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.conversation-item:hover, .conversation-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}
.conversation-item.unread { border-right: 4px solid var(--secondary); }

.chat-container {
    height: 450px;
    overflow-y: auto;
    background: #f8f4f0;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.chat-container::-webkit-scrollbar { width: 5px; }
.chat-container::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

.message-bubble {
    max-width: 70%;
    padding: 0.7rem 1rem;
    border-radius: 18px;
    font-size: 0.95rem;
    position: relative;
    word-wrap: break-word;
}
.message-sent {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 18px 18px 4px 18px;
    align-self: flex-end;
}
.message-received {
    background: white;
    color: #2c1810;
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    align-self: flex-start;
}
.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 3px;
    display: block;
}

/* ===== BROWSE PAGE ===== */
.filter-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    background: #fff;
    padding: 1.5rem;
}
.filter-card h5 {
    color: var(--primary);
    font-weight: 700;
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* ===== SECTION HEADERS ===== */
.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 60%;
    height: 4px;
    background: linear-gradient(to left, var(--secondary), transparent);
    border-radius: 2px;
}

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(135deg, var(--bg-dark), #2d0a0a);
    color: var(--text-light);
}
.footer-link {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.2s;
    display: block;
    margin-bottom: 0.3rem;
}
.footer-link:hover { color: var(--secondary); }

/* ===== ALERTS ===== */
.alert {
    border: none;
    border-radius: 12px;
    font-weight: 600;
}

/* ===== BADGE ONLINE ===== */
.online-badge {
    width: 12px;
    height: 12px;
    background: #28a745;
    border-radius: 50%;
    border: 2px solid white;
    display: inline-block;
}

/* ===== LIKE BUTTON ===== */
.btn-like {
    background: none;
    border: 2px solid #e8d5c5;
    border-radius: 50px;
    padding: 0.3rem 0.8rem;
    transition: all 0.3s;
    font-size: 0.85rem;
}
.btn-like:hover, .btn-like.liked {
    background: linear-gradient(135deg, var(--primary), #C0392B);
    border-color: transparent;
    color: white;
}

/* ===== PAGE HEADER ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 2rem 0;
    color: white;
}
.page-header h1 { font-weight: 800; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .hero-pattern { display: none; }
    .profile-avatar { width: 110px; height: 110px; }
    .chat-container { height: 350px; }
}
