/* ========================================
   u-prompt main.css v2.1
   Marketplace per Prompt AI - Stile Amazon
   Ultima modifica: Aggiunti Form Components
   ======================================== */

/* ========================================
   1. RESET E VARIABILI
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colori principali u-prompt */
    --uprompt-dark: rgb(53, 29, 73);          /* Header principale */
    --uprompt-nav: #432f50;            /* Barra navigazione */
    --uprompt-orange: #ff9900;         /* Colore accento principale */
    --uprompt-yellow: #ffd814;         /* Bottoni primari */
    --uprompt-blue: #088888;           /* Link e azioni */
    --uprompt-light-blue: #17dbdb;           /* Link e azioni */
    
    /* Grigi */
    --gray-900: #0f1111;               /* Testo principale */
    --gray-700: #2d3436;               /* Testo secondario */
    --gray-600: #565959;               /* Testo terziario */
    --gray-400: #999999;               /* Testo disabilitato */
    --gray-300: #e0dede;               /* testo su nero */
    --gray-200: #e7e7e7;               /* Bordi */
    --gray-100: #f5f5f5;               /* Sfondi */
    --white: #ffffff;                  /* Bianco puro */
    
    /* Stati */
    --success: #067d71;                /* Successo */
    --danger: #cc0c52;                 /* Errore/Pericolo */
    --warning: #ff9900;                /* Avvertimento */
    --info: #007185;                   /* Informazione */
    
    /* Layout */
    --max-width: 1500px;               /* Larghezza massima contenuti */
    --header-height: 60px;             /* Altezza header */
    --nav-height: 39px;                /* Altezza navigazione */
    
    /* Z-index layers */
    --z-dropdown: 1000;
    --z-modal: 2000;
    --z-sidemenu: 2001;
    --z-overlay: 2000;
}

/* ========================================
   2. TIPOGRAFIA E BODY
   ======================================== */
html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Amazon Ember', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.3;
    color: var(--gray-900);
    background: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Fix per JavaScript visibile */
body > script {
    display: none !important;
}

/* Links */
a {
    color: var(--uprompt-blue);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #c7511f;
    text-decoration: underline;
}

/* ========================================
   3. HEADER PRINCIPALE
   ======================================== */
.main-header {
    position: relative;
    z-index: var(--z-dropdown);
    width: 100%;
}

/* Header Top Bar */
.header-top {
    background: var(--uprompt-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    gap: 20px;
    height: var(--header-height);
}

/* Logo */
.header-logo {
    flex-shrink: 0;
}

.header-logo img {
    height: 40px;
    width: auto;
    display: block;
}

/* Search Bar */
.header-search {
    flex: 1;
    max-width: 700px;
}

.search-form {
    display: flex;
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: border-color 0.2s;
}

.search-form:focus-within {
    border-color: var(--uprompt-orange);
}

.search-select {
    background: #f3f3f3;
    border: none;
    padding: 0 12px;
    font-size: 12px;
    color: var(--gray-700);
    min-width: 150px;
    cursor: pointer;
    border-right: 1px solid #cdcdcd;
    outline: none;
}

.search-input {
    flex: 1;
    border: none;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
}

.search-button {
    background: var(--uprompt-orange);
    border: none;
    padding: 0 20px;
    color: var(--uprompt-dark);
    cursor: pointer;
    transition: background 0.2s;
}

.search-button:hover {
    background: #f08804;
}

/* Language Selector */
.header-flag {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--white);
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 2px;
    position: relative;
    transition: border-color 0.2s;
}

.header-flag:hover {
    border-color: var(--white);
}

.flag-icon {
    width: 20px;
    height: 15px;
    object-fit: cover;
}

/* Account Section */
.header-account,
.header-orders,
.header-cart {
    color: var(--white);
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 2px;
    transition: border-color 0.2s;
    position: relative;
}

.header-account:hover,
.header-orders:hover,
.header-cart:hover {
    border-color: var(--white);
}

.account-box,
.header-orders,
.cart-link {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.account-hello,
.orders-label {
    font-size: 12px;
    opacity: 0.9;
}

.account-lists,
.orders-text,
.cart-text {
    font-size: 14px;
    font-weight: 700;
}

/* Cart */
.cart-link {
    color: var(--white);
    text-decoration: none;
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-count {
    position: absolute;
    top: -5px;
    left: 15px;
    background: var(--uprompt-orange);
    color: var(--uprompt-dark);
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.cart-icon {
    font-size: 24px;
}

/* ========================================
   4. NAVIGATION BAR
   ======================================== */
.header-nav {
    background: var(--uprompt-nav);
    border-bottom: 1px solid var(--gray-200);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 20px;
    height: var(--nav-height);
}

.nav-menu-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 2px;
    transition: border-color 0.2s;
}

.nav-menu-btn:hover {
    border-color: var(--white);
}

.nav-main {
    display: flex;
    gap: 5px;
    flex: 1;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid transparent;
    border-radius: 2px;
    transition: border-color 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    border-color: var(--white);
    text-decoration: none;
}

.nav-link.prime {
    color: var(--uprompt-orange);
    font-weight: 600;
}

.nav-link.highlight {
    background: var(--uprompt-orange);
    color: var(--uprompt-dark);
    font-weight: 600;
}

.nav-link.highlight:hover {
    background: #f08804;
    border-color: transparent;
}

.nav-right {
    display: flex;
    gap: 5px;
}

/* ========================================
   5. DROPDOWNS
   ======================================== */
.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    min-width: 200px;
    display: none;
    z-index: var(--z-dropdown);
    margin-top: 3px;
}

.account-dropdown {
    position: absolute;
    top: calc(100% + 3px) !important;
    right: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    min-width: 300px;
    display: none;
    z-index: 1000;
    margin-top: 0 !important;
}

.header-flag::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
    display: none;
    z-index: 999;
}

.header-account::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 6px;
    background: transparent;
    display: none;
    z-index: 999;
    pointer-events: auto;
}

.header-account:hover::before {
    display: block;
}

.header-account:hover .account-dropdown,
.account-dropdown:hover {
    display: block !important;
}

.header-flag:hover::after {
    display: block;
}

.header-flag:hover .language-dropdown,
.language-dropdown:hover {
    display: block !important;
}

.language-dropdown.show,
.header-flag:hover .language-dropdown {
    display: block;
}

.header-account:hover .account-dropdown {
    display: block;
}

.language-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: var(--gray-900);
    text-decoration: none;
    transition: background 0.2s;
}

.language-dropdown a:hover {
    background: var(--gray-100);
}

.language-dropdown a.active {
    background: var(--gray-100);
    font-weight: 600;
}

.dropdown-section {
    padding: 12px 15px;
    border-bottom: 1px solid var(--gray-200);
}

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

.dropdown-section h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.dropdown-section a {
    display: block;
    padding: 6px 0;
    color: var(--gray-900);
    font-size: 13px;
}

.dropdown-section a:hover {
    color: #c7511f;
    text-decoration: underline;
}

.dropdown-section a i {
    width: 20px;
    margin-right: 5px;
    color: var(--gray-600);
}

.dropdown-signin {
    padding: 15px;
}

.dropdown-new {
    font-size: 12px;
    color: var(--gray-600);
    text-align: center;
    margin-top: 10px;
}

/* User info nel dropdown */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.user-info > div {
    flex: 1;
}

.user-info strong {
    display: block;
    font-size: 16px;
    color: var(--gray-900);
    margin-bottom: 3px;
}

/* Badge Creator */
.badge-creator {
    display: inline-block;
    background: var(--uprompt-orange);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Icona utente nell'header */
.account-hello .fa-user-circle {
    color: var(--white);
    opacity: 0.9;
    vertical-align: middle;
}

/* Stile migliorato per il nome utente */
.header-account .account-box {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 100px;
}

.header-account .account-hello {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 3px;
}

.header-account .account-lists {
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Dropdown migliorato per utente autenticato */
.account-dropdown .dropdown-section:first-child {
    background: var(--gray-100);
    margin: -12px -15px 0;
    padding: 15px;
    border-radius: 4px 4px 0 0;
}

/* Separatore nel dropdown */
.account-dropdown hr {
    margin: 10px 0;
    border: none;
    border-top: 1px solid var(--gray-200);
}

/* Link logout evidenziato */
.logout-link {
    color: var(--danger) !important;
}

.logout-link:hover {
    background: rgba(204, 12, 57, 0.05);
}

/* Area Creator nel dropdown */
.account-dropdown a i {
    width: 20px;
    margin-right: 8px;
    color: var(--gray-600);
    text-align: center;
    display: inline-block;
}

.account-dropdown a:hover i {
    color: var(--uprompt-orange);
}

/* ========================================
   6. SIDE MENU (MOBILE)
   ======================================== */
.side-menu {
    position: fixed;
    top: 0;
    left: -365px;
    width: 365px;
    height: 100vh;
    background: var(--white);
    z-index: var(--z-sidemenu);
    transition: left 0.3s;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
}

.side-menu.active {
    left: 0;
}

.side-menu-header {
    background: var(--uprompt-nav);
    color: var(--white);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 19px;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 100;
}

.side-menu-header i {
    font-size: 27px;
    margin-right: 10px;
}

.close-menu {
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.close-menu:hover {
    color: var(--uprompt-orange);
}

.side-menu-content {
    padding: 0;
}

.menu-section {
    padding: 20px;
    border-bottom: 5px solid #d5dbdb;
}

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

.menu-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--gray-900);
}

.menu-section a {
    display: flex;
    align-items: center;
    padding: 13px 0;
    color: var(--gray-900);
    font-size: 14px;
    text-decoration: none;
}

.menu-section a:hover {
    color: #c7511f;
}

.menu-section a i {
    width: 24px;
    margin-right: 12px;
    color: var(--gray-600);
    text-align: center;
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-overlay);
    display: none;
}

.menu-overlay.active {
    display: block;
}

body.menu-open {
    overflow: hidden;
}

/* ========================================
   7. HERO CAROUSEL
   ======================================== */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: var(--gray-100);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    z-index: 2;
    padding: 30px;
    max-width: 600px;
}

.carousel-content h1,
.carousel-content h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.carousel-content p {
    font-size: 18px;
    margin-bottom: 25px;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    font-size: 30px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 3;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255, 255, 255, 1);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: var(--white);
}

/* ========================================
   8. MAIN CONTENT
   ======================================== */
.page-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 15px;
}

/* Sections */
section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-200);
}

.section-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
}

.view-all {
    color: var(--uprompt-blue);
    text-decoration: none;
    font-size: 14px;
}

.view-all:hover {
    color: var(--uprompt-orange);
    text-decoration: underline;
}

/* ========================================
   9. PRODUCT GRIDS
   ======================================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
}

.category-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.category-card a {
    text-decoration: none;
    color: inherit;
}

.category-icon {
    font-size: 36px;
    color: var(--uprompt-orange);
    margin-bottom: 10px;
}

.category-card h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--gray-900);
}

.category-card p {
    font-size: 12px;
    color: var(--gray-600);
}

/* Prompts Grid */
.prompts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.prompt-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
}

.prompt-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.prompt-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.prompt-image {
    width: 100%;
    height: 200px;
    background: var(--gray-100);
    overflow: hidden;
}

.prompt-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prompt-content {
    padding: 15px;
}

.prompt-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.prompt-description {
    font-size: 12px;
    color: var(--gray-600);
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.prompt-meta {
    font-size: 12px;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.prompt-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.star {
    color: #ddd;
    font-size: 14px;
}

.star.filled {
    color: var(--uprompt-orange);
}

.review-count {
    font-size: 12px;
    color: var(--gray-600);
}

.prompt-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.price-free {
    color: var(--success);
}

.currency {
    font-size: 12px;
    vertical-align: super;
}

/* ========================================
   10. BADGES
   ======================================== */
.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 2px;
    text-transform: uppercase;
    z-index: 1;
}

.badge-featured {
    background: var(--uprompt-orange);
    color: var(--white);
}

.badge-new {
    background: var(--info);
    color: var(--white);
}

.badge-sale {
    background: var(--danger);
    color: var(--white);
}

/* ========================================
   11. DEALS SECTION
   ======================================== */
.section-deals {
    margin-bottom: 40px;
}

.countdown-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gray-600);
}

.deals-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 40px;
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deal-highlight {
    flex: 1;
}

.discount-badge {
    display: inline-block;
    background: var(--danger);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
}

.deal-highlight h3 {
    font-size: 28px;
    margin-bottom: 10px;
}

.deal-highlight p {
    font-size: 16px;
    margin-bottom: 20px;
}

.deal-stats {
    text-align: right;
}

.deal-stat {
    font-size: 14px;
    opacity: 0.9;
}

.deal-stat strong {
    font-size: 24px;
    display: block;
}

/* ========================================
   12. FEATURES SECTION
   ======================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    text-align: center;
    padding: 30px;
}

.feature-icon {
    font-size: 48px;
    color: var(--uprompt-orange);
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--gray-900);
}

.feature-card p {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.4;
}

/* ========================================
   13. CTA SECTION
   ======================================== */
.section-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 40px -15px;
    padding: 60px 15px;
}

.cta-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: var(--white);
}

.cta-container h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.cta-container p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 40px;
}

.cta-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* ========================================
   14. BUTTONS
   ======================================== */
.btn {
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    display: inline-block;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--uprompt-yellow);
    border-color: #fcd200;
    color: var(--gray-900);
}

.btn-primary:hover {
    background: #f7ca00;
    text-decoration: none;
}

.btn-secondary {
    background: var(--white);
    border-color: var(--gray-200);
    color: var(--gray-900);
}

.btn-secondary:hover {
    background: var(--gray-100);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    border-color: var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-link {
    background: none;
    color: var(--uprompt-blue);
    padding: 10px;
    border: none;
}

.btn-link:hover {
    text-decoration: underline;
}

/* ========================================
   15. FORM COMPONENTS
   ======================================== */

/* Form Sections */
.form-section {
    padding: 30px;
    border-bottom: 1px solid var(--gray-200);
    background: white;
}

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

.form-section h2 {
    color: var(--gray-900);
    font-size: 20px;
    margin: 0 0 20px 0;
    font-weight: 600;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--gray-900);
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group label.required::after {
    content: " *";
    color: var(--danger);
}

/* Form Inputs */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group input[type="date"],
.form-group input[type="datetime-local"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: white;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--uprompt-orange);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

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

.form-group input[type="file"] {
    padding: 8px;
    background: white;
}

.form-group small {
    display: block;
    color: var(--gray-600);
    font-size: 13px;
    margin-top: 5px;
}

/* Character Counter */
.char-count {
    display: block;
    text-align: right;
    color: var(--gray-600);
    font-size: 12px;
    margin-top: 5px;
}

/* Form Row (2 columns) */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Checkbox and Radio Groups */
.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-group label,
.radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"],
.radio-group input[type="radio"] {
    width: auto;
    margin-right: 8px;
}

/* Form Actions */
.form-actions {
    padding: 20px 30px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--gray-200);
}

.form-actions-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Price Input Wrapper */
.price-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 12px;
    color: var(--gray-600);
    font-weight: 500;
    pointer-events: none;
}

.price-input-wrapper input {
    padding-left: 30px !important;
}

/* Image Preview */
.current-image,
.image-preview {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}

.current-image img,
.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.current-image p,
.image-preview p {
    margin: 10px 0 0 0;
    color: var(--gray-600);
    font-size: 13px;
}

/* Status Badges Extended */
.status-badge,
.prompt-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active { 
    background: #d4edda; 
    color: #155724; 
}

.status-test { 
    background: #fff3cd; 
    color: #856404; 
}

.status-draft { 
    background: #f8d7da; 
    color: #721c24; 
}

.status-review {
    background: #d1ecf1;
    color: #0c5460;
}

.status-suspended {
    background: #e2e3e5;
    color: #383d41;
}

/* ========================================
   16. MODAL STYLES
   ======================================== */
.modal {
    display: none;
    position: fixed;
    z-index: var(--z-modal);
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: block;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideInModal 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: var(--gray-900);
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--gray-600);
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--gray-900);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ========================================
   17. FOOTER
   ======================================== */
.back-to-top {
    background: var(--uprompt-nav);
    color: var(--white);
    text-align: center;
    padding: 15px;
    cursor: pointer;
    font-size: 13px;
    /*transition: background 0.2s;*/
}

.back-to-top:hover {
    background: #37475a;
}

.back-to-top.visible {
    position: fixed;
    bottom: 35px;
    right: 15px;
    padding: 8px 12px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

/* Footer Content */
.footer-content {
    background: var(--uprompt-nav);
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-content .footer-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column h3 {
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 10px;
}

.footer-column a {
    color: #ddd;
    font-size: 14px;
}

.footer-column a:hover {
    text-decoration: underline;
}

/* Footer Bottom */
.footer-bottom {
    background: var(--uprompt-dark);
    padding: 10px 0;
}

.footer-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.footer-bottom-row:first-child {
    border-bottom: 1px solid #3a4553;
}

.footer-logo img {
    height: 30px;
}

.footer-options {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-language,
.footer-currency,
.footer-country {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ddd;
    font-size: 13px;
}

.footer-currency select {
    background: transparent;
    border: 1px solid #848688;
    color: #ddd;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 13px;
}

.footer-legal {
    width: 100%;
}

.legal-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.legal-links a {
    color: #ddd;
    font-size: 12px;
}

.copyright {
    text-align: center;
    color: #999;
    font-size: 11px;
    padding-top: 15px;
}

/* ========================================
   18. NOTIFICATIONS
   ======================================== */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: var(--z-modal);
}

.notification {
    background: var(--white);
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
    min-width: 300px;
}

.notification.success {
    border-left: 4px solid var(--success);
}

.notification.error {
    border-left: 4px solid var(--danger);
}

.notification.warning {
    border-left: 4px solid var(--warning);
}

.notification.info {
    border-left: 4px solid var(--info);
}

.notification-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0 5px;
    color: var(--gray-600);
    opacity: 0.8;
    transition: opacity 0.3s;
}

.notification-close:hover {
    opacity: 1;
}

.notification.fade-out {
    animation: fadeOut 0.3s ease;
}

/* ========================================
   19. COOKIE BANNER
   ======================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--gray-100);
    border-top: 1px solid var(--gray-200);
    padding: 15px;
    z-index: 9999;
    display: none;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-content p {
    flex: 1;
    margin: 0;
    font-size: 13px;
    color: var(--gray-600);
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

/* ========================================
   20. UTILITIES
   ======================================== */
.text-center {
    text-align: center;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: var(--gray-600);
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-200);
    border-top-color: var(--uprompt-orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--uprompt-orange);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Hide broken images */
img:not([src]),
img[src=""],
img[src*="undefined"] {
    display: none;
}

img[src*="/flags/"] {
    width: 30px !important;
    height: 20px !important;
    object-fit: cover !important;
    border-radius: 3px;
}

/* ========================================
   21. RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1200px) {
    .header-container,
    .nav-container,
    .page-container,
    .footer-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    /* Header adjustments */
    .header-search {
        display: none;
    }
    
    .header-orders {
        display: none;
    }
    
    .header-account .account-hello {
        font-size: 11px;
    }
    
    .header-account .account-lists {
        font-size: 13px;
    }
    
    /* Navigation */
    .nav-main {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-right {
        display: none;
    }
    
    /* Grids */
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .prompts-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    /* Hero */
    .hero-carousel {
        height: 250px;
    }
    
    /* CTA */
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-stats {
        grid-template-columns: 1fr;
    }
    
    /* Forms */
    .form-section {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .form-actions-right {
        width: 100%;
        justify-content: flex-end;
    }
    
    /* Modal */
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    /* Notifications */
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    /* Footer */
    .footer-content .footer-container {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-options {
        flex-direction: column;
    }
    
    .legal-links {
        flex-direction: column;
        text-align: center;
    }
    
    /* Cookie banner */
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .cookie-buttons .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* Mobile specific */
    .header-container {
        padding: 10px;
    }
    
    /* Nascondi testo su mobile molto piccoli */
    @media (max-width: 380px) {
        .header-account .account-hello span {
            display: none;
        }
        
        .header-account .account-hello i {
            font-size: 20px;
        }
    }
    
    .prompts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .prompt-image {
        height: 150px;
    }
    
    /* Forms */
    .form-section {
        padding: 15px;
    }
    
    .form-section h2 {
        font-size: 18px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    /* Carousel */
    .carousel-content {
        padding: 20px;
    }
    
    .carousel-content h1,
    .carousel-content h2 {
        font-size: 24px;
    }
    
    .carousel-content p {
        font-size: 14px;
    }
}

/**
 * Session Modal Styles
 * Stili per i modal di gestione sessione
 * 
 * Path: /var/www/uprompt-v1/web-app/assets/css/session-modal.css
 * Oppure aggiungere a main.css
 */

/* Overlay del modal */
.session-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-in-out;
}

/* Container del modal */
.session-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.3s ease-out;
    overflow: hidden;
}

/* Header del modal */
.session-modal-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.session-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

/* Varianti per tipo di messaggio */
.session-modal.warning .session-modal-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.session-modal.error .session-modal-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.session-modal.info .session-modal-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* Body del modal */
.session-modal-body {
    padding: 24px;
    color: #374151;
    line-height: 1.6;
}

.session-modal-body p {
    margin: 0;
    font-size: 16px;
}

/* Footer del modal */
.session-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: #f9fafb;
}

.session-modal-footer .btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.session-modal-footer .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.session-modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Warning container nella pagina */
#session-warning {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    display: none;
    animation: slideDown 0.3s ease-out;
}

#session-warning .alert {
    margin: 0;
    border-radius: 0;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#session-warning .alert-warning {
    background-color: #fef3c7;
    border-bottom: 2px solid #f59e0b;
    color: #92400e;
}

#session-warning .btn-sm {
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 6px;
}

/* Animazioni */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .session-modal {
        width: 95%;
        margin: 16px;
    }
    
    .session-modal-header,
    .session-modal-body,
    .session-modal-footer {
        padding: 16px;
    }
    
    #session-warning .alert {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}