/*
 * style.css - Fișier CSS personalizat pentru Cheat Market
 * Versiune: 2.0 - Design rafinat și modern
 */

/* Google Fonts Import (Asigură-te că e la începutul fișierului!) */
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@300;400;500;600;700&family=Orbitron:wght@400..900&family=Press+Start+2P&family=Roboto:wght@300;400;500;700&display=swap');

/* Variabile CSS pentru culori */
:root {
    --primary-color: #00e676; /* Verde neon vibrant */
    --secondary-color: #00b0ff; /* Albastru electric */
    --background-dark: #121212; /* Fundal foarte închis */
    --card-bg: #1e1e1e; /* Fundal pentru carduri */
    --text-light: #e0e0e0; /* Culoare text deschis */
    --text-medium: #a0a0a0; /* Culoare text gri mediu */
    --border-color: #333333; /* Culoare chenar subtil */
    --glow-color: #00e676; /* Culoare pentru efecte de strălucire */
}

/* General Body Styling */
body {
    font-family: 'Roboto', sans-serif; /* Font principal, lizibil */
    background-color: var(--background-dark);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden; /* Previne scrollbar-ul orizontal */
    background-image: radial-gradient(circle at top left, #1a1a1a, var(--background-dark) 70%),
                      url('https://www.transparenttextures.com/patterns/clean-textile.png'); /* O textură subtilă */
    background-size: cover;
    background-attachment: fixed; /* Face fundalul fix când se derulează */
}

main {
    flex: 1;
    padding-bottom: 50px;
}

/* Navbar Enhancements */
.navbar {
    background-color: rgba(30, 30, 30, 0.95) !important; /* Aproape transparent pentru efect de "glassmorphism" */
    backdrop-filter: blur(10px); /* Efect de blur pe fundal */
    -webkit-backdrop-filter: blur(10px); /* Suport Safari */
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    position: sticky; /* Face navbar-ul sticky */
    top: 0;
    z-index: 1000; /* Asigură că este deasupra altor elemente */
}

.navbar-brand {
    font-family: 'Orbitron', sans-serif; /* Font high-tech pentru brand */
    font-weight: 700;
    font-size: 2rem;
    color: var(--primary-color) !important;
    text-shadow: 0 0 10px rgba(0, 230, 118, 0.5); /* Efect de strălucire neon */
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    color: var(--secondary-color) !important;
    text-shadow: 0 0 15px rgba(0, 176, 255, 0.7);
}

.nav-link {
    font-family: 'Chakra Petch', sans-serif; /* Font modern, tehnic */
    font-weight: 500;
    color: var(--text-medium) !important;
    transition: color 0.3s ease-in-out, transform 0.3s ease-in-out;
    position: relative;
    padding: 10px 15px !important;
}

.nav-link:hover {
    color: var(--text-light) !important;
    transform: translateY(-2px);
}

.nav-link::after { /* Efect de underline la hover */
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    transition: width 0.3s ease-out;
}

.nav-link:hover::after {
    width: calc(100% - 30px); /* Lățimea underline-ului */
}

.navbar-nav .nav-item .btn-outline-light {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transition: all 0.3s ease-in-out;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 600;
}

.navbar-nav .nav-item .btn-outline-light:hover {
    background-color: var(--primary-color);
    color: var(--background-dark);
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.6);
    transform: scale(1.05);
}

/* Container Spacing */
.container.mt-5 {
    margin-top: 4rem !important;
    margin-bottom: 4rem !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(30, 30, 30, 0.8)), url('https://source.unsplash.com/random/1600x600?abstract,tech') no-repeat center center;
    background-size: cover;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    padding: 100px 50px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    animation: fadeInScale 1s ease-out forwards; /* Animație la încărcare */
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.hero-section::before { /* Efect de particule sau grilă abstractă */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.2;
    z-index: 1;
}

.hero-section > * { /* Asigură că conținutul e deasupra pseudo-elementului */
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 4.8rem;
    margin-bottom: 30px;
    color: var(--primary-color);
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(0, 230, 118, 0.8);
}

.hero-section p {
    font-size: 1.5rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 50px;
    color: var(--text-light);
    font-weight: 300;
}

.hero-section .btn {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.3rem;
    padding: 18px 35px;
    border-radius: 35px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* Curba de animație mai fluidă */
}

.hero-section .btn-primary {
    background: linear-gradient(45deg, var(--primary-color), #00c853);
    border: none;
    color: var(--background-dark);
    box-shadow: 0 5px 15px rgba(0, 230, 118, 0.4);
}

.hero-section .btn-primary:hover {
    background: linear-gradient(45deg, #00c853, var(--primary-color));
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 230, 118, 0.6);
}

.hero-section .btn-outline-primary {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    background-color: transparent;
}

.hero-section .btn-outline-primary:hover {
    background-color: var(--secondary-color);
    color: var(--background-dark);
    box-shadow: 0 5px 15px rgba(0, 176, 255, 0.4);
    transform: translateY(-5px) scale(1.02);
}

/* Section Headings */
h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 50px;
    font-size: 3.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 15px;
    text-shadow: 0 0 10px rgba(0, 176, 255, 0.4);
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100px;
    height: 5px;
    background-color: var(--primary-color);
    border-radius: 3px;
    box-shadow: 0 0 8px var(--primary-color);
}

hr {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 80px 0;
}

/* Card Styling for Products */
.product-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    position: relative;
    z-index: 1; /* Pentru a gestiona z-index cu efectul de hover */
}

.product-card::before { /* Efect de fundal subtil la hover */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 230, 118, 0.05), rgba(0, 176, 255, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    z-index: -1;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 20px var(--primary-color); /* Umbră mai mare și strălucire */
}

.product-thumbnail {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-bottom: 1px solid var(--border-color);
}

.product-card .card-body {
    padding: 25px;
}

.product-card .card-title {
    font-family: 'Chakra Petch', sans-serif;
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.product-card .card-subtitle {
    font-size: 1rem;
    color: var(--text-medium);
    margin-bottom: 1.2rem;
}

.product-card .card-text.description-preview {
    font-size: 0.95rem;
    color: var(--text-medium);
    height: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 1.5rem;
}

.product-card .card-price {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    color: var(--secondary-color);
    font-weight: bold;
    margin-top: 1.5rem;
    text-align: right;
    text-shadow: 0 0 8px rgba(0, 176, 255, 0.4);
}

.product-card .btn-primary {
    background-color: var(--primary-color);
    border: none;
    color: var(--background-dark);
    font-weight: 600;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.product-card .btn-primary:hover {
    background-color: #00c853;
    box-shadow: 0 5px 15px rgba(0, 230, 118, 0.5);
    transform: scale(1.05);
}

/* Product Details Card */
.product-details-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
    padding: 50px;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.product-details-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(0, 230, 118, 0.05) 0%, transparent 70%);
    animation: rotateBackground 20s linear infinite;
    z-index: 0;
}

.product-details-card > * {
    position: relative;
    z-index: 1;
}

.product-details-card .card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 15px rgba(0, 230, 118, 0.6);
}

.product-details-card .card-subtitle {
    font-size: 1.4rem;
    color: var(--text-medium);
    margin-bottom: 2.5rem;
}

.product-details-card .card-text.description-full {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 3.5rem;
    white-space: pre-wrap; /* Păstrează formatarea rândurilor noi */
}

.product-details-card .card-price {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem;
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 3.5rem;
    text-shadow: 0 0 15px rgba(0, 176, 255, 0.6);
}

.product-details-card .btn-success {
    background: linear-gradient(45deg, var(--primary-color), #00c853);
    border: none;
    color: var(--background-dark);
    font-size: 1.5rem;
    padding: 18px 40px;
    border-radius: 35px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 6px 20px rgba(0, 230, 118, 0.4);
}

.product-details-card .btn-success:hover {
    background: linear-gradient(45deg, #00c853, var(--primary-color));
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 230, 118, 0.7);
}

.product-details-card .btn-secondary {
    background-color: var(--border-color);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 1.1rem;
    padding: 15px 30px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.product-details-card .btn-secondary:hover {
    background-color: #555555;
    border-color: #555555;
    transform: translateY(-2px);
}

/* Form Styling (Login/Register/Dashboard) */
.form-container {
    max-width: 600px;
    margin: 60px auto;
    padding: 40px;
    background-color: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.form-container h2 {
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    margin-bottom: 40px;
    color: var(--secondary-color);
    font-size: 2.8rem;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 176, 255, 0.4);
}

.form-label {
    color: var(--text-medium);
    font-weight: 500;
    margin-bottom: 8px;
    display: block; /* Asigură că label-ul e pe rândul său */
    font-size: 1.05rem;
}

.form-control {
    background-color: var(--background-dark);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 1.05rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    background-color: var(--background-dark);
    color: var(--text-light);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 230, 118, 0.25), 0 0 15px rgba(0, 230, 118, 0.4); /* Glow on focus */
}

.form-container .btn-primary {
    background: linear-gradient(45deg, var(--primary-color), #00c853);
    border: none;
    color: var(--background-dark);
    font-weight: 700;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.2rem;
    width: 100%;
    margin-top: 25px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 6px 20px rgba(0, 230, 118, 0.4);
}

.form-container .btn-primary:hover {
    background: linear-gradient(45deg, #00c853, var(--primary-color));
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 8px 25px rgba(0, 230, 118, 0.6);
}

/* Alerts */
.alert {
    margin-top: 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    text-align: center;
    font-weight: 500;
    padding: 15px 20px;
}
.alert-success {
    background-color: #214d35; /* Darker success */
    border-color: #38764a;
    color: #92d192;
}
.alert-danger {
    background-color: #5a2e31; /* Darker danger */
    border-color: #8c4348;
    color: #e09b9b;
}
.alert-info {
    background-color: #2e4c5a; /* Darker info */
    border-color: #43768c;
    color: #9bd1e0;
}
.alert-warning {
    background-color: #5a552e; /* Darker warning */
    border-color: #8c8543;
    color: #e0d19b;
}


/* About Us Section */
.about-us {
    padding: 60px 40px;
    background-color: var(--card-bg);
    border-radius: 20px;
    margin-top: 80px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    text-align: center;
    border: 1px solid var(--border-color);
}

.about-us h2 {
    margin-bottom: 30px;
    font-size: 2.8rem;
}

.about-us p {
    color: var(--text-medium);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.15rem;
    line-height: 1.9;
}

/* Pagination */
.pagination .page-item .page-link {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--secondary-color);
    transition: all 0.3s ease;
    border-radius: 8px; /* Colțuri rotunjite pentru paginare */
    margin: 0 3px; /* Spațiu între numere */
}

.pagination .page-item .page-link:hover {
    background-color: var(--secondary-color);
    color: var(--background-dark);
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(0, 176, 255, 0.4);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--background-dark);
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.4);
}

/* Footer Styling */
footer {
    background-color: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-medium);
    padding: 30px 0;
    text-align: center;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
}

/* Keyframe Animations */
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes rotateBackground {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-section h1 {
        font-size: 3.5rem;
    }
    .hero-section p {
        font-size: 1.2rem;
    }
    h2 {
        font-size: 2.5rem;
    }
    .product-details-card .card-title {
        font-size: 2.5rem;
    }
    .product-details-card .card-price {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 20px;
    }
    .hero-section h1 {
        font-size: 2.8rem;
        letter-spacing: 1px;
    }
    .hero-section p {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    .hero-section .btn {
        font-size: 1rem;
        padding: 12px 25px;
    }
    h2 {
        font-size: 2rem;
        letter-spacing: 1px;
        margin-bottom: 30px;
    }
    h2::after {
        width: 70px;
    }
    .product-card .card-title {
        font-size: 1.4rem;
    }
    .product-card .card-price {
        font-size: 1.3rem;
    }
    .product-thumbnail {
        height: 180px;
    }
    .form-container {
        padding: 25px;
        margin: 30px auto;
    }
    .form-container h2 {
        font-size: 2rem;
    }
    .product-details-card {
        padding: 30px;
    }
    .product-details-card .card-title {
        font-size: 2rem;
    }
    .product-details-card .card-subtitle {
        font-size: 1.1rem;
    }
    .product-details-card .card-price {
        font-size: 2.2rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.5rem;
    }
    .hero-section h1 {
        font-size: 2.2rem;
    }
    .hero-section .btn {
        font-size: 0.9rem;
        padding: 10px 20px;
        display: block;
        margin: 10px auto;
    }
    h2 {
        font-size: 1.8rem;
    }
    .product-card .card-body {
        padding: 15px;
    }
    .product-details-card .btn-success,
    .product-details-card .btn-secondary {
        width: 100%;
        margin-top: 15px !important;
        padding: 12px 20px;
    }
}