:root {
    --primary: #007bff;
    --primary-dark: #0056b3;
    --secondary: #6c757d;
    --dark: #212529;
    --light: #f8f9fa;
    --white: #ffffff;
    --accent: #28a745;
    --bg-gradient: linear-gradient(135deg, #eef2f3 0%, #8e9eab 100%);
    --glass: rgba(255, 255, 255, 0.85);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', 'Outfit', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background: var(--light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--primary);
}

.logo-icon {
    background: var(--primary);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 8px;
    font-family: 'Outfit';
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Buttons */
.btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, opacity 0.2s;
}

.btn:active {
    transform: scale(0.95);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-block {
    width: 100%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('https://images.unsplash.com/photo-1512917774080-9991f1c4c750?ixlib=rb-4.0.3&auto=format&fit=crop&w=1400&q=80');
    background-size: cover;
    background-position: center;
    height: 500px;
    display: flex;
    align-items: center;
    color: var(--white);
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.search-box {
    background: var(--white);
    padding: 10px;
    border-radius: 12px;
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 15px;
    font-size: 1rem;
    outline: none;
}

/* Brands Section Alternative (Full Width) */
.brands-section-alt {
    padding: 60px 0 20px;
}

.brands-row {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    flex-wrap: wrap;
}

.brand-item {
    background: var(--white);
    padding: 20px 30px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #eee;
    flex: 1;
    min-width: 150px;
}

.brand-item img {
    max-width: 100px;
    margin-bottom: 10px;
    filter: grayscale(1);
    opacity: 0.7;
    transition: 0.3s;
}

.brand-item:hover img {
    filter: grayscale(0);
    opacity: 1;
}

/* News & Communities Container */
.news-communities-container {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 50px;
    padding: 40px 0 80px;
}

.news-list {
    list-style: none;
}

.news-list li {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 20px;
}

.news-list .date {
    color: var(--secondary);
    font-size: 0.9rem;
    min-width: 90px;
}

.news-list a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
}

.news-list a:hover {
    color: var(--primary);
}

.communities-side-section {
    background: #fff;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.communities-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.community-side-card {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: transform 0.2s;
}

.community-side-card:last-child {
    border-bottom: none;
}

.community-side-card:hover {
    transform: translateX(5px);
}

.community-side-card h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.community-side-card .price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #e4393c;
}

.community-side-card .growth {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Footer */
.main-footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.footer-links ul {
    list-style: none;
    margin-top: 15px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 30px;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

/* Modal */
.login-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--white);
    padding: 30px 40px;
    border-radius: 20px;
    width: 380px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}


.close {
    position: absolute;
    right: 25px;
    top: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--dark);
}

.modal-content h2 {
    margin-bottom: 25px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
}

/* Ensure SweetAlert is always on top */
.swal2-container,
.swal2-center,
.swal2-backdrop-show,
body.swal2-shown>[aria-hidden="true"] {
    z-index: 2147483647 !important;
    /* Max INT32 value to be absolutely sure */
}