/* ============================================
   VARIABLES & ROOT STYLES
   ============================================ */
:root {
    /* Colors */
    --primary-purple: #8B5CF6;
    --secondary-purple: #A78BFA;
    --dark-purple: #6D28D9;
    --bg-dark: #0F0F1E;
    --bg-darker: #080812;
    --bg-card: #1A1A2E;
    --bg-card-hover: #222236;
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0B8;
    --accent-pink: #EC4899;
    --accent-blue: #3B82F6;
    --online-green: #10B981;
    --border-color: rgba(139, 92, 246, 0.2);
    
    /* Gradients */
    --gradient-purple: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
    --gradient-bg: linear-gradient(180deg, #0F0F1E 0%, #1A1A2E 100%);
    --gradient-overlay: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
    
    /* Spacing */
    --sidebar-width: 80px;
    --mobile-nav-height: 70px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-purple);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-purple);
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    background: rgba(15, 15, 30, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.logo {
    font-family: 'Pacifico', cursive;
    font-size: 2rem;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    font-weight: 400;
}

.navbar-toggler {
    border-color: var(--primary-purple);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(139, 92, 246, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.nav-link {
    color: var(--text-secondary);
    transition: var(--transition-fast);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-link:hover {
    color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.1);
}

.btn-sign-up {
    background: var(--gradient-purple);
    color: white;
    padding: 0.6rem 1.8rem;
    border-radius: 25px;
    border: none;
    font-weight: 600;
    transition: var(--transition-normal);
    text-decoration: none;
    display: inline-block;
}

.btn-sign-up:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
    color: white;
}

/* ============================================
   SIDEBAR (Desktop)
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: rgba(15, 15, 30, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    padding: 100px 0 20px 0;
    z-index: 999;
    display: flex;
    flex-direction: column;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.sidebar-item {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 1.3rem;
    transition: var(--transition-fast);
    position: relative;
    text-decoration: none;
}

.sidebar-item:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-purple);
    transform: translateX(5px);
}

.sidebar-item.active {
    background: var(--gradient-purple);
    color: white;
}

.sidebar-item[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 70px;
    background: var(--bg-card);
    padding: 8px 12px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}

.sidebar-upgrade {
    margin-top: auto;
}

.sidebar-upgrade:hover {
    background: rgba(236, 72, 153, 0.1);
    color: var(--accent-pink);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: 80px;
    min-height: 100vh;
    padding-bottom: 100px;
}

@media (max-width: 991.98px) {
    .main-content {
        margin-left: 0;
        padding-bottom: calc(100px + var(--mobile-nav-height));
    }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    padding: 80px 0;
    background: var(--gradient-bg);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-title .highlight {
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.btn-get-started {
    background: var(--gradient-purple);
    border: none;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 30px;
    transition: var(--transition-normal);
}

.btn-get-started:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.5);
}

/* Responsive Hero */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
}

/* ============================================
   FEATURED SECTION
   ============================================ */
.featured-section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-header h2 .highlight {
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ============================================
   FILTERS
   ============================================ */
.filters-row {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.7rem 1.5rem;
    border-radius: 20px;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.filter-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--primary-purple);
    color: var(--primary-purple);
}

.filter-btn.active {
    background: var(--gradient-purple);
    border-color: var(--primary-purple);
    color: white;
}

/* ============================================
   COMPANION CARDS
   ============================================ */
.companion-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition-normal);
    border: 1px solid var(--border-color);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.companion-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.3);
    border-color: var(--primary-purple);
}

.companion-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--gradient-purple);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.companion-media {
    position: relative;
    width: 100%;
    padding-top: 125%;
    overflow: hidden;
    background: var(--bg-darker);
}

.companion-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.companion-card:hover .companion-video {
    transform: scale(1.05);
}

.companion-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.companion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.companion-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.companion-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    padding: 5px 12px;
    border-radius: 15px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--online-green);
}

.companion-status.online i {
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.companion-location {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.companion-age {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.companion-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.btn-action {
    flex: 1;
    padding: 0.8rem;
    border-radius: 12px;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-call {
    background: rgba(16, 185, 129, 0.1);
    color: var(--online-green);
}

.btn-call:hover {
    background: var(--online-green);
    color: white;
    transform: translateY(-2px);
}

.btn-chat {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-purple);
}

.btn-chat:hover {
    background: var(--gradient-purple);
    color: white;
    transform: translateY(-2px);
}

/* Create Card */
.create-card {
    background: rgba(139, 92, 246, 0.05);
    border: 2px dashed var(--primary-purple);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.create-card:hover {
    background: rgba(139, 92, 246, 0.1);
    border-style: solid;
}

.create-content {
    text-align: center;
}

.create-content i {
    font-size: 4rem;
    color: var(--primary-purple);
    margin-bottom: 1rem;
}

.create-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 600;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem 0;
    margin-top: 4rem;
}

.footer .logo {
    font-size: 1.8rem;
}

.footer-address,
.footer-email,
.footer-contact {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

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

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-purple);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-purple);
    font-size: 1.2rem;
    transition: var(--transition-fast);
    text-decoration: none;
}

.social-link:hover {
    background: var(--gradient-purple);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ============================================
   MOBILE BOTTOM NAVIGATION
   ============================================ */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-nav-height);
    background: rgba(15, 15, 30, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding: 0 10px;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 10px;
    transition: var(--transition-fast);
    flex: 1;
    max-width: 80px;
}

.mobile-nav-item i {
    font-size: 1.3rem;
}

.mobile-nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
}

.mobile-nav-item.active {
    color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.1);
}

.mobile-nav-item:hover {
    color: var(--primary-purple);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 1199.98px) {
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .companion-card {
        margin-bottom: 0;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .btn-get-started {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.highlight {
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient {
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading State */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Video Error State */
.video-error {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 3rem;
}

/* Filter Button Transition */
.filter-btn {
    transition: all 0.3s ease;
}

.filter-btn:hover {
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* Companion Card Cursor */
.companion-card:not(.create-card) {
    cursor: pointer;
}

.companion-card .btn-action {
    cursor: pointer;
}

/* No Results State */
.text-muted {
    color: #6c757d !important;
}

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

.companion-card {
    animation: fadeIn 0.5s ease-out;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .filter-btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}
/* Companion image (when no video) */
.companion-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

/* My Companions badge style */
.companion-badge[style*="764ba2"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* Modal de Confirmação de Exclusão */
.delete-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.delete-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.delete-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.4);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.delete-modal-overlay.active .delete-modal {
    transform: scale(1);
}

.delete-modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.delete-modal-icon {
    width: 70px;
    height: 70px;
    background: rgba(239, 68, 68, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.delete-modal-icon i {
    font-size: 2rem;
    color: #ef4444;
}

.delete-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.delete-modal-subtitle {
    color: #a0a0a0;
    font-size: 0.95rem;
}

.delete-modal-body {
    margin-bottom: 1.5rem;
}

.companion-delete-info {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.companion-delete-avatar {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid rgba(139, 92, 246, 0.5);
}

.companion-delete-details h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.companion-delete-details p {
    color: #a0a0a0;
    font-size: 0.85rem;
    margin: 0;
}

.delete-warning {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.delete-warning-text {
    color: #fca5a5;
    font-size: 0.9rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.delete-warning-text i {
    font-size: 1.2rem;
}

.delete-modal-form {
    margin-bottom: 1rem;
}

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

.delete-form-label {
    display: block;
    color: #e0e0e0;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.delete-form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.delete-form-input:focus {
    outline: none;
    border-color: #8b5cf6;
    background: rgba(255, 255, 255, 0.08);
}

.delete-form-input::placeholder {
    color: #666;
}

.delete-error-message {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: none;
}

.delete-error-message.show {
    display: block;
}

.delete-modal-actions {
    display: flex;
    gap: 1rem;
}

.delete-modal-btn {
    flex: 1;
    padding: 0.875rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.delete-modal-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.delete-modal-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.delete-modal-btn-confirm {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}

.delete-modal-btn-confirm:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.delete-modal-btn-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

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

/* Botão de Delete no Card */
.btn-delete-companion {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(239, 68, 68, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.btn-delete-companion:hover {
    background: #dc2626;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

.btn-delete-companion i {
    color: #ffffff;
    font-size: 0.9rem;
}

/* Responsivo */
@media (max-width: 576px) {
    .delete-modal {
        padding: 1.5rem;
    }
    
    .delete-modal-actions {
        flex-direction: column;
    }
    
    .delete-modal-btn {
        width: 100%;
    }
}