/* CSS Variables for consistent theming */
:root {
    --primary-color: #e91e63;
    --primary-dark: #c2185b;
    --secondary-color: #9c27b0;
    --dark-color: #333;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #fff;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    line-height: 1.2;
    font-weight: 600;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

/* Header & Navigation Styles */
.main-header, .user-navbar, .navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar, .nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-right {
    display: flex;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    background-color: rgba(233, 30, 99, 0.1);
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-avatar {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.user-avatar:hover {
    background-color: rgba(233, 30, 99, 0.1);
}

.user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.user-menu:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background-color: rgba(233, 30, 99, 0.1);
    color: var(--primary-color);
}

.dropdown-divider {
    height: 1px;
    background-color: #e9ecef;
    margin: 0.5rem 0;
}

.logout-btn {
    color: var(--danger-color) !important;
}

/* Notification Badge */
.notification-badge {
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: rgba(233, 30, 99, 0.1);
    transform: translateY(-2px);
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Main Content Padding for Fixed Header */
body.logged-out main {
    margin-top: 80px;
}

body.logged-in main {
    margin-top: 70px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6rem 0;
    text-align: center;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: white;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.section-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    background: #f8f9fa;
    padding: 5rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.cta-section p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 1rem;
    font-weight: 600;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    font-size: 1.5rem;
    color: #bdc3c7;
    transition: color 0.3s;
}

.social-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 70px);
}

.dashboard-sidebar {
    width: 300px;
    background: white;
    box-shadow: var(--box-shadow);
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: calc(100vh - 70px);
    overflow-y: auto;
    z-index: 100;
}

.dashboard-main {
    flex: 1;
    margin-left: 300px;
    padding: 30px;
    background-color: var(--light-color);
}

/* User Profile Card */
.user-profile-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius);
    padding: 20px;
    color: white;
    margin-bottom: 25px;
    text-align: center;
}

.profile-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-avatar {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
}

.profile-info h3 {
    margin-bottom: 5px;
    font-size: 18px;
}

.profile-info p {
    margin-bottom: 8px;
    font-size: 14px;
    opacity: 0.9;
}

.profile-completion {
    margin-top: 15px;
}

.completion-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    margin-bottom: 5px;
    overflow: hidden;
}

.completion-progress {
    height: 100%;
    background: white;
    border-radius: 3px;
}

.profile-completion span {
    font-size: 12px;
}

/* Sidebar Stats */
.sidebar-stats {
    display: flex;
    justify-content: space-between;
    background: white;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 25px;
    box-shadow: var(--box-shadow);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 5px;
}

/* Sidebar Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    margin-bottom: 5px;
    transition: var(--transition);
    position: relative;
}

.nav-item:hover {
    background: rgba(108, 92, 231, 0.1);
    color: var(--secondary-color);
}

.nav-item.active {
    background: var(--secondary-color);
    color: white;
}

.nav-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: 28px;
    color: var(--dark-color);
}

.header-actions {
    display: flex;
    gap: 15px;
}

.filter-btn, .refresh-btn {
    background: white;
    border: 1px solid var(--gray-color);
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover, .refresh-btn:hover {
    background: #f1f2f6;
}

.filter-dropdown {
    position: relative;
}

.filter-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    width: 280px;
    z-index: 10;
    margin-top: 10px;
}

.filter-section {
    margin-bottom: 20px;
}

.filter-section h4 {
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-light);
}

.distance-slider {
    width: 100%;
    margin: 10px 0;
}

.distance-value {
    display: block;
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
}

.age-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.age-range input {
    width: 70px;
    padding: 8px;
    border: 1px solid var(--gray-color);
    border-radius: 6px;
}

.apply-filters {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px;
    width: 100%;
    cursor: pointer;
    transition: var(--transition);
}

.apply-filters:hover {
    background: var(--primary-dark);
}

/* Auth Forms */
.auth-form {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.checkbox-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
}

.auth-link a {
    color: #667eea;
    text-decoration: none;
}

/* Match Cards */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 2rem;
}

.match-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
}

.match-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.match-photo {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.match-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.match-card:hover .match-photo img {
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.match-card:hover .photo-overlay {
    opacity: 1;
}

.view-profile-btn {
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
}

.view-profile-btn:hover {
    background: var(--primary-color);
    color: white;
}

.verified-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success-color);
    font-size: 12px;
}

.match-info {
    padding: 20px;
}

.match-info h3 {
    margin-bottom: 5px;
    font-size: 18px;
}

.location {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.bio-preview {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.match-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: rgba(108, 92, 231, 0.1);
    color: var(--secondary-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.match-actions {
    display: flex;
    justify-content: space-between;
    padding: 0 20px 20px;
    gap: 10px;
}

.btn-dislike, .btn-like, .btn-super-like {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-dislike {
    background: white;
    color: var(--gray-color);
    border: 2px solid var(--gray-color);
}

.btn-dislike:hover {
    background: #ffeaea;
    color: var(--danger-color);
    border-color: var(--danger-color);
    transform: scale(1.1);
}

.btn-like {
    background: var(--primary-color);
    color: white;
}

.btn-like:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.btn-super-like {
    background: var(--warning-color);
    color: white;
}

.btn-super-like:hover {
    background: #f7b731;
    transform: scale(1.1);
}

/* No Matches State */
.no-matches {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.no-matches-icon {
    font-size: 60px;
    color: var(--gray-color);
    margin-bottom: 20px;
}

.no-matches h3 {
    margin-bottom: 10px;
    color: var(--text-color);
}

.no-matches p {
    color: var(--text-light);
    margin-bottom: 25px;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 10px 0;
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 12px;
    position: relative;
    transition: var(--transition);
}

.mobile-nav-item.active {
    color: var(--primary-color);
}

.mobile-nav-item i {
    font-size: 20px;
    margin-bottom: 5px;
}

.mobile-notification {
    position: absolute;
    top: -5px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    max-width: 500px;
    width: 90%;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.match-modal {
    text-align: center;
    padding: 30px;
}

.match-animation .hearts {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.match-animation .hearts i {
    color: var(--primary-color);
    font-size: 30px;
    animation: heartbeat 1.5s infinite;
}

.match-animation .hearts i:nth-child(2) {
    animation-delay: 0.2s;
}

.match-animation .hearts i:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.match-animation h2 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.match-profiles {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.profile-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-color);
}

.profile-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.match-modal .match-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 0;
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Messages */
.error-message {
    background: #ff6b6b;
    color: white;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-sidebar {
        width: 250px;
    }
    
    .dashboard-main {
        margin-left: 250px;
    }
    
    .matches-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-links, .auth-buttons {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .navbar, .nav-content {
        padding: 0.8rem 0;
    }

    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }

    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .features h2,
    .cta-section h2 {
        font-size: 2rem;
    }
    
    .stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }

    .dashboard-sidebar {
        display: none;
    }
    
    .dashboard-main {
        margin-left: 0;
        padding: 20px 15px 80px;
    }
    
    .mobile-nav {
        display: flex;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .matches-grid {
        grid-template-columns: 1fr;
    }
    
    .match-photo {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .dashboard-main {
        padding: 15px 10px 80px;
    }
    
    .match-info {
        padding: 15px;
    }
    
    .match-actions {
        padding: 0 15px 15px;
    }
    
    .btn-dislike, .btn-like, .btn-super-like {
        width: 45px;
        height: 45px;
    }
}