/* ========================================
   DRAGON BALL Z - API EXPLORER
   Main Stylesheet
   ======================================== */

/* ========================================
   VARIABLES & GLOBALS
   ======================================== */
:root {
    --orange-primary: #ff6b1a;
    --blue-primary: #0066cc;
    --yellow-primary: #ffd700;
    --dark-bg: #1a1f3a;
    --card-bg: #2a2f4a;
    --text-light: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1a1f3a 0%, #2a2f4a 100%);
    color: var(--text-light);
    min-height: 100vh;
}

/* ========================================
   USER INFO BAR
   ======================================== */
.user-info-bar {
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 0;
    border-bottom: 2px solid var(--orange-primary);
}

.user-welcome {
    color: var(--yellow-primary);
    font-weight: bold;
}

.user-welcome i {
    margin-right: 8px;
    font-size: 1.2rem;
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.language-selector {
    display: flex;
    gap: 8px;
}

.btn-lang {
    background: transparent;
    border: 2px solid var(--orange-primary);
    color: var(--text-light);
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-lang:hover,
.btn-lang.active {
    background: var(--orange-primary);
    color: white;
    transform: scale(1.05);
}

.btn-logout {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    border: none;
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    white-space: nowrap;
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 68, 68, 0.4);
}

.logout-text {
    margin-left: 5px;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
    background: url('https://images.unsplash.com/photo-1620121692029-d088224ddc74?w=1920') center/cover;
    padding: 60px 0;
    position: relative;
    margin-bottom: 30px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 31, 58, 0.85);
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.title-glow {
    font-family: 'Bangers', cursive;
    color: var(--orange-primary);
    text-shadow: 0 0 10px var(--yellow-primary),
                 0 0 20px var(--yellow-primary),
                 0 0 30px var(--orange-primary);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.subtitle {
    color: white;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 1;
}

/* Quick Access Buttons */
.btn-quick-access {
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 0.8rem 2rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.btn-quick-access:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.5);
    border-color: var(--yellow-primary);
}

.btn-quick-access i {
    margin-right: 0.5rem;
}

/* ========================================
   NAVIGATION BAR
   ======================================== */
.navbar-custom,
.bg-dark-custom {
    background: rgba(42, 47, 74, 0.95) !important;
    backdrop-filter: blur(10px);
}

.navbar {
    padding: 20px 0;
    margin-bottom: 0;
    border-bottom: 3px solid var(--orange-primary);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.filter-section {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.btn-filter {
    background: linear-gradient(135deg, var(--orange-primary) 0%, #ff8c4a 100%);
    border: 2px solid var(--yellow-primary);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 26, 0.3);
}

.btn-filter:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.btn-filter.active {
    background: linear-gradient(135deg, var(--yellow-primary) 0%, #ffed4e 100%);
    color: #1a1f3a;
}

.btn-reload,
.btn-storage {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    border: 2px solid var(--yellow-primary);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-storage {
    background: linear-gradient(135deg, var(--blue-primary) 0%, #1e88e5 100%);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.btn-reload:hover,
.btn-storage:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

/* ========================================
   SEARCH SECTION
   ======================================== */
.search-section {
    background: rgba(26, 31, 58, 0.5);
    padding: 1.5rem 0;
}

.input-group-text {
    background: var(--orange-primary);
    border: none;
    color: white;
}

#searchInput {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--orange-primary);
    color: white;
    padding: 0.75rem 1.25rem;
}

#searchInput:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--yellow-primary);
    color: white;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   CHARACTER CARDS
   ======================================== */
.character-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    border: 3px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.character-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--yellow-primary);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.4);
}

/* Card Image Container */
.card-img-container {
    position: relative;
    height: 280px;
    background: linear-gradient(135deg, #1a1f3a 0%, #2a2f4a 100%);
    overflow: hidden;
}

.card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.character-card:hover .card-img-container img {
    transform: scale(1.1);
}

/* Favorite Button */
.btn-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid white;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.btn-favorite:hover {
    transform: scale(1.2);
    background: rgba(233, 30, 99, 0.9);
    border-color: var(--yellow-primary);
}

.btn-favorite.active {
    background: #e91e63;
    color: var(--yellow-primary);
}

/* Card Body */
.card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-family: 'Bangers', cursive;
    font-size: 1.5rem;
    color: var(--orange-primary);
    margin-bottom: 0.75rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Badges */
.badge {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    font-weight: 600;
}

.badge-race {
    background: linear-gradient(135deg, var(--blue-primary) 0%, #1e88e5 100%);
    color: white;
    border-radius: 20px;
}

.badge-gender {
    background: linear-gradient(135deg, var(--orange-primary) 0%, #ff8c4a 100%);
    color: white;
    border-radius: 20px;
}

/* Stat Items */
.stat-item {
    background: rgba(255, 107, 26, 0.1);
    padding: 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 107, 26, 0.3);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.stat-item strong {
    color: var(--yellow-primary);
}

/* Details Button */
.btn-details {
    background: linear-gradient(135deg, var(--orange-primary) 0%, #ff8c4a 100%);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
    width: 100%;
}

.btn-details:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 107, 26, 0.5);
}

/* Fade in animation */
.fade-in {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Energy effect */
.energy-effect {
    animation: energyPulse 1s infinite;
}

@keyframes energyPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    }
}

/* ========================================
   MODALS
   ======================================== */
.modal-content {
    background: var(--card-bg);
    border: 3px solid var(--orange-primary);
    border-radius: 15px;
}

.bg-dark-modal {
    background: var(--card-bg) !important;
}

.modal-header {
    background: linear-gradient(135deg, var(--orange-primary) 0%, #ff8c4a 100%);
    border-bottom: 3px solid var(--yellow-primary);
}

.modal-title {
    font-family: 'Bangers', cursive;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.btn-close {
    filter: brightness(0) invert(1);
}

/* Modal Stat Items */
.modal-body .stat-item {
    background: rgba(255, 107, 26, 0.1);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 107, 26, 0.3);
    margin-bottom: 0.75rem;
}

.modal-body .stat-item strong {
    color: var(--yellow-primary);
    margin-right: 0.5rem;
}

/* Storage Modal Items */
.favorite-mini-card {
    background: rgba(255, 107, 26, 0.1);
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid rgba(255, 107, 26, 0.3);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.favorite-mini-card:hover {
    border-color: var(--orange-primary);
    transform: translateY(-2px);
}

.favorite-mini-card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
}

.custom-list-item {
    background: rgba(0, 102, 204, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    border: 2px solid rgba(0, 102, 204, 0.3);
    margin-bottom: 1.5rem;
}

.characters-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.list-character-tag {
    background: var(--orange-primary);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
}

.note-card {
    background: rgba(156, 39, 176, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    border: 2px solid rgba(156, 39, 176, 0.3);
    margin-bottom: 1.5rem;
    position: relative;
}

.btn-delete-note {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-delete-note:hover {
    transform: scale(1.1);
    background: #c82333;
}

.note-date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.stat-card {
    background: rgba(255, 107, 26, 0.1);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid rgba(255, 107, 26, 0.3);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--orange-primary);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--yellow-primary);
    margin: 0.5rem 0;
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.progress-custom {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    height: 30px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar-custom {
    background: linear-gradient(135deg, var(--orange-primary) 0%, var(--yellow-primary) 100%);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.85rem;
    transition: width 0.5s ease;
}

/* ========================================
   LOADING & EMPTY STATES
   ======================================== */
.loading-container {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 215, 0, 0.3);
    border-top-color: var(--yellow-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 5rem;
    color: var(--orange-primary);
    margin-bottom: 20px;
    opacity: 0.5;
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.page-item {
    list-style: none;
}

.page-link {
    background: rgba(255, 107, 26, 0.2);
    border: 2px solid var(--orange-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.page-link:hover {
    background: var(--orange-primary);
    color: white;
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--yellow-primary) 0%, #ffed4e 100%);
    color: #1a1f3a;
    font-weight: bold;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-item.disabled .page-link:hover {
    background: rgba(255, 107, 26, 0.2);
    transform: none;
}

/* ========================================
   FOOTER
   ======================================== */
.footer-custom {
    background: rgba(0, 0, 0, 0.5);
    border-top: 2px solid var(--orange-primary);
    margin-top: 3rem;
}

.footer-custom p {
    color: white;
    margin-bottom: 0.5rem;
}

.footer-custom small {
    display: block;
    color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .title-glow {
        font-size: 2.5rem;
    }
    
    .filter-section {
        flex-direction: column;
    }
    
    .btn-filter {
        width: 100%;
    }
    
    .btn-quick-access {
        font-size: 1rem;
        padding: 0.6rem 1.5rem;
    }
    
    .card-img-container {
        height: 220px;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .user-info-bar .d-flex {
        flex-direction: column;
        gap: 10px;
    }
    
    .language-selector {
        flex-direction: row;
        justify-content: center;
    }
    
    .navbar-nav {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-filter {
        margin: 0.25rem 0 !important;
    }
}

/* ========================================
   UTILITIES
   ======================================== */
.bg-dark-custom {
    background: rgba(42, 47, 74, 0.95) !important;
    backdrop-filter: blur(10px);
}

.bg-orange {
    background: var(--orange-primary) !important;
}

.text-warning {
    color: var(--yellow-primary) !important;
}

/* Bootstrap Row Fix for Character Cards */
#charactersContainer.row {
    margin-left: -15px;
    margin-right: -15px;
}

#charactersContainer > [class*='col-'] {
    padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 30px;
}
