/* ============================================
   PUBLIC DASHBOARD - LANDING PAGE
   ============================================ */

/* HERO SECTION */
.hero-section {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    padding: 4rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
    padding: 0 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-cta {
    margin-top: 2rem;
}

.btn-hero {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--primary-color);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-hero:hover {
    background: var(--primary-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* SECTIONS CONTAINER */
.latest-releases-section,
.top-rated-section,
.cta-section {
    padding: 3rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--primary-color);
}

/* ITEMS GRID */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.item-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.item-image {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    position: relative;
    background: var(--bg-secondary);
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.item-card:hover .item-image img {
    transform: scale(1.05);
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}

.no-image i {
    font-size: 3rem;
    color: var(--text-muted);
}

.score-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    color: #fbbf24;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.score-badge i {
    font-size: 0.8rem;
}

.item-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.item-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.item-meta i {
    font-size: 0.8rem;
}

/* ADD BUTTON */
.add-button-container {
    margin-top: auto;
}

.btn-add-toggle,
.btn-add-guest {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.btn-add-toggle:hover,
.btn-add-guest:hover {
    background: var(--primary-color);
    color: #fff;
    transform: scale(1.1);
}

.badge-in-library {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 20px;
    color: #22c55e;
    font-size: 0.875rem;
    font-weight: 600;
}

/* TABS SYSTEM */
.tabs-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.tabs-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-btn i {
    font-size: 1.1rem;
}

.tabs-content {
    position: relative;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
    position: relative; /* For carousel nav positioning */
}

.tab-pane.active {
    display: block;
}

/* CAROUSEL NAVIGATION BUTTONS */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-card);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 1.25rem;
}

.carousel-nav:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav-left {
    left: -20px;
}

.carousel-nav-right {
    right: -20px;
}

/* SHOW MORE BUTTON */
.show-more-container {
    margin-top: 2rem;
    text-align: center;
}

.btn-show-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-show-more:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-show-more i {
    font-size: 1.1rem;
}

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

/* CTA FINAL SECTION */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
    padding: 4rem 0;
    text-align: center;
    color: #fff;
    margin-top: 3rem;
}

.cta-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-cta {
    display: inline-block;
    padding: 1rem 3rem;
    background: #fff;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-cta:hover {
    background: #f3f4f6;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.cta-login {
    margin-top: 1.5rem;
    font-size: 1rem;
    opacity: 0.9;
}

.cta-login a {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
}

.cta-login a:hover {
    opacity: 0.8;
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* RESPONSIVE */
/* Desktop médio - quebra tabs em 2 linhas (4+2) */
@media (max-width: 1500px) {
    .tabs-header {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .tab-btn {
        flex: 0 0 calc(25% - 0.5rem);
        min-width: unset;
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
        justify-content: center;
    }
}

/* Tablet - quebra tabs em 2 linhas (3+3) */
@media (max-width: 1200px) {
    .tab-btn {
        flex: 0 0 calc(33.333% - 0.5rem);
        padding: 0.8rem 0.75rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .tabs-header {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .tab-btn {
        flex: 0 0 calc(50% - 0.5rem);
        min-width: unset;
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
        justify-content: center;
    }

    .cta-section h2 {
        font-size: 1.75rem;
    }

    .cta-section p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .items-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs-header {
        gap: 0.25rem;
    }
    
    .tab-btn {
        flex: 0 0 calc(50% - 0.25rem);
        padding: 0.65rem 0.25rem;
        font-size: 0.75rem;
    }
    
    .tab-btn i {
        font-size: 0.9rem;
    }

    .btn-hero,
    .btn-cta {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}

/* ============================================
   ADD BUTTON DROPDOWN
   ============================================ */

/* Add Button Wrapper - contains button and dropdown */
.add-button-wrapper {
    position: relative;
    flex-shrink: 0;
    z-index: 100;
    width: 100%;
}

.btn-add-toggle {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    width: 100%;
}

.btn-add-toggle:hover {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.btn-add-toggle:active {
    transform: translateY(0);
}

/* Add Dropdown Menu - appears ABOVE button */
.add-dropdown-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    width: 100%;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(99, 102, 241, 0.2);
    border: 2px solid rgba(99, 102, 241, 0.3);
    display: none;
    z-index: 1000;
    overflow: hidden;
    backdrop-filter: blur(10px);
    padding: 0.5rem 0;
}

.add-dropdown-menu.show {
    display: block;
    animation: slideUpFade 0.3s ease;
}

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

.dropdown-item {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: transparent;
    color: var(--text-primary);
    border: none;
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    text-align: left;
}

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

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.12));
    color: var(--primary-light);
}

.dropdown-item:active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
}

.dropdown-item i {
    font-size: 1.1rem;
    color: var(--primary-light);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
