* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: transparent;
    overflow-x: hidden;
    background-image: url('images/logo.png');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Fallback/background on the root if pseudo-elements are blocked */
html {
    background: linear-gradient(120deg, #0f172a 0%, #1e3a8a 45%, #0f172a 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo h1 {
    font-size: 1.8rem;
    color: #e74c3c;
    font-weight: 700;
    white-space: nowrap;
    margin: 0;
}

.nav-menu {
    display: flex;
    gap: 1rem;
    flex: 1;
    justify-content: center;
}

.nav-search {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-input {
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    width: 250px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.btn-search {
    padding: 0.6rem 1rem;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-search:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.nav-link {
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
}

.nav-link.active {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background-color: #e74c3c;
    border-radius: 2px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.auth-container,
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu {
    flex-direction: column;
    gap: 0.5rem;
}

.user-menu span {
    font-weight: 600;
    color: #333;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e74c3c;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.user-email {
    font-size: 0.75rem;
    color: #7f8c8d;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Sections */
body {
    padding-top: 70px;
}

.main-content {
    width: 100%;
}

.section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    scroll-margin-top: 70px;
    position: relative;
    z-index: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-content {
    width: 100%;
    max-width: 1200px;
    padding: 2rem 20px;
    animation: fadeIn 0.5s ease-in-out;
}

.section h2 {
    font-size: 3rem;
    margin-bottom: 3rem;
    text-align: center;
    color: #2c3e50;
}

/* About Section */
#about {
    background: linear-gradient(135deg, #f8f9fa 0%, #ecf0f1 100%);
}

#about .section-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.about-text h4 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.about-text p {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.8;
    font-size: 1rem;
}

.about-features {
    list-style: none;
    padding: 0;
}

.about-features li {
    padding: 0.8rem 0;
    color: #555;
    border-bottom: 1px solid #ecf0f1;
    font-weight: 500;
}

.about-features li:last-child {
    border-bottom: none;
}

.about-image {
    text-align: center;
}

.about-image img {
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Products Section - Bikes */
#products {
    background: #fff;
}

#products .section-content {
    display: flex;
    flex-direction: column;
}

/* Contact Section */
#contact {
    background: linear-gradient(135deg, #f8f9fa 0%, #ecf0f1 100%);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.contact-item h4 {
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.contact-item p {
    color: #555;
    line-height: 1.8;
}

.contact-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
}

.map-container {
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn-login,
.btn-logout,
.btn-admin,
.btn-primary,
.btn-danger {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login,
.btn-primary {
    background-color: #e74c3c;
    color: white;
}

.btn-login:hover,
.btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-logout {
    background-color: #95a5a6;
    color: white;
}

.btn-logout:hover {
    background-color: #7f8c8d;
}

.btn-admin {
    background-color: #3498db;
    color: white;
}

.btn-admin:hover {
    background-color: #2980b9;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6rem 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.3rem;
    opacity: 0.9;
}

/* Bikes Section */
.bikes-section {
    padding: 4rem 0;
}

.bikes-section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: #2c3e50;
}

.bikes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Events Section */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.event-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.event-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.12);
}

.event-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.event-info {
    padding: 1rem;
}

.event-title {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.event-meta {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.event-description {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.event-actions {
    display: flex;
    gap: 0.5rem;
}

.event-actions button {
    flex: 1;
    padding: 0.6rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Bike Card */
.bike-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.bike-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.bike-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.bike-info {
    padding: 1.5rem;
}

.bike-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.bike-model {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.bike-price {
    font-size: 1.5rem;
    color: #e74c3c;
    font-weight: 700;
    margin-bottom: 1rem;
}

.bike-description {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.bike-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.feature-tag {
    background-color: #ecf0f1;
    color: #2c3e50;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.bike-actions {
    display: flex;
    gap: 0.5rem;
}

.bike-actions button {
    flex: 1;
    padding: 0.6rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-view {
    background-color: #3498db;
    color: white;
}

.btn-view:hover {
    background-color: #2980b9;
}

.btn-book {
    background-color: #27ae60;
    color: white;
}

.btn-book:hover {
    background-color: #229954;
}

.btn-delete {
    background-color: #e74c3c;
    color: white;
    flex: 0.5;
}

.btn-delete:hover {
    background-color: #c0392b;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-content.bike-detail {
    max-width: 700px;
}

.close {
    float: right;
    font-size: 2rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

/* Admin Panel */
.admin-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #ecf0f1;
}

.admin-section:last-child {
    border-bottom: none;
}

.admin-section h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.admin-bikes-list {
    display: grid;
    gap: 1rem;
}

.admin-bike-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #ecf0f1;
    border-radius: 4px;
}

.admin-bike-info h4 {
    margin-bottom: 0.3rem;
    color: #2c3e50;
}

.admin-bike-info p {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Bike Detail Modal */
.bike-detail-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.bike-detail-content h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.bike-detail-model {
    color: #7f8c8d;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.bike-detail-price {
    font-size: 2rem;
    color: #e74c3c;
    font-weight: 700;
    margin-bottom: 1rem;
}

.bike-detail-description {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.bike-detail-features {
    margin-bottom: 2rem;
}

.bike-detail-features h4 {
    margin-bottom: 0.8rem;
    color: #2c3e50;
}

.bike-detail-features ul {
    list-style: none;
    padding-left: 0;
}

.bike-detail-features li {
    padding: 0.5rem 0;
    color: #555;
    border-bottom: 1px solid #ecf0f1;
}

.bike-detail-features li:before {
    content: "✓ ";
    color: #27ae60;
    font-weight: bold;
    margin-right: 0.5rem;
}

.detail-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.detail-actions button {
    flex: 1;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.footer p {
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .nav-search {
        width: 100%;
    }

    .search-input {
        flex: 1;
        width: auto;
    }

    .section h2 {
        font-size: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .bikes-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 20% auto;
    }

    .detail-actions {
        flex-direction: column;
    }
}

/* Dynamic site-wide background (light, pastel animated gradient + soft floating blobs) */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    /* soft pastel gradient */
    background: linear-gradient(120deg, #fff7ed 0%, #ffe4e6 35%, #e6f7ff 70%);
    background-size: 300% 300%;
    filter: saturate(1.02) contrast(1.01);
    opacity: 1;
    animation: pastelGradient 18s ease-in-out infinite;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    /* layered soft blobs to create movement */
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255,255,255,0.85) 0 80px, transparent 81px),
        radial-gradient(circle at 80% 30%, rgba(255,255,255,0.80) 0 120px, transparent 121px),
        radial-gradient(circle at 50% 80%, rgba(255,255,255,0.78) 0 160px, transparent 161px);
    background-repeat: no-repeat;
    background-position: 0 0, 0 0, 0 0;
    opacity: 0.95;
    pointer-events: none;
    mix-blend-mode: overlay;
    transform: translateZ(0);
    animation: blobsDrift 32s linear infinite;
}

@keyframes pastelGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes blobsDrift {
    0% { background-position: 0 0, 0 0, 0 0; }
    50% { background-position: 120px -60px, -140px 80px, 60px -120px; }
    100% { background-position: 0 0, 0 0, 0 0; }
}

/* Reduce intensity and motion on small screens for performance */
@media (max-width: 600px) {
    body::after { opacity: 0.6; animation-duration: 80s; }
    body::before { animation-duration: 28s; }
}

/* Ensure sections remain readable by applying a faint backdrop where needed */
.section {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(6px) saturate(1.02);
}

/* Tweak hero and products contrast to fit new light background */
.hero {
    background: transparent;
    color: #2c3e50;
}

#products {
    background: rgba(255,255,255,0.96);
}

/* Search Results Modal */
.modal-content.search-modal {
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
}

.search-category {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #ecf0f1;
}

.search-category:last-child {
    border-bottom: none;
}

.search-category h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.search-result-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    background: #ecf0f1;
    transform: translateX(4px);
}

.search-result-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
}

.search-result-content h5 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.search-result-meta {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.search-result-desc {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.search-result-content .btn-view {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}
