/* Component Styles */

/* Header Component */
.header-main {
    position: sticky;
    top: 0;
    z-index: 50;
    transition: all 0.3s ease;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo i {
    font-size: 2.5rem;
    color: var(--neon-purple);
}

/* Enhanced Navigation Menu */
.navigation-menu {
    background: rgba(15, 15, 30, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
    position: relative;
}

.nav-tab {
    position: relative;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-icon-wrapper {
    position: relative;
    display: inline-block;
}

.tab-icon {
    font-size: 1.125rem;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.tab-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, var(--neon-purple), transparent);
    opacity: 0;
    transition: all 0.4s ease;
    filter: blur(8px);
}

.tab-text {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.tab-underline {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    transition: transform 0.4s ease;
}

/* Hover Effects */
.nav-tab:hover {
    transform: translateY(-3px);
    background: rgba(139, 92, 246, 0.15);
}

.nav-tab:hover .tab-icon {
    transform: rotateY(360deg) scale(1.2);
    color: var(--neon-purple);
}

.nav-tab:hover .tab-glow {
    opacity: 0.6;
    width: 30px;
    height: 30px;
}

.nav-tab:hover .tab-underline {
    transform: translateX(-50%) scaleX(1);
}

.nav-tab:hover .tab-text {
    color: var(--gold);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* Active State */
.nav-tab.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(192, 132, 252, 0.2));
    box-shadow: 
        0 4px 15px rgba(139, 92, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-tab.active .tab-icon {
    color: var(--gold);
    transform: scale(1.15);
    animation: iconPulse 2s ease-in-out infinite;
}

.nav-tab.active .tab-glow {
    opacity: 1;
    width: 35px;
    height: 35px;
    animation: glowPulse 2s ease-in-out infinite;
}

.nav-tab.active .tab-text {
    color: var(--gold);
    font-weight: 700;
}

.nav-tab.active .tab-underline {
    transform: translateX(-50%) scaleX(1);
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    animation: underlineShimmer 3s linear infinite;
}

/* Animations */
@keyframes iconPulse {
    0%, 100% { transform: scale(1.15); }
    50% { transform: scale(1.25); }
}

@keyframes glowPulse {
    0%, 100% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

@keyframes underlineShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Ripple Effect on Click */
.nav-tab::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.nav-tab:active::before {
    width: 300px;
    height: 300px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-tab {
        padding: 0.5rem 0.75rem;
    }
    
    .tab-text {
        font-size: 0.8rem;
    }
    
    .tab-icon {
        font-size: 1rem;
    }
}

/* Card Components */
.info-card {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
    border-color: var(--gold);
}

.stat-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(192, 132, 252, 0.1));
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.3);
}

/* Form Elements */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(10, 10, 20, 0.9);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 0.5rem;
    color: white;
    transition: all 0.3s ease;
    -webkit-appearance: none;
}

.form-input:focus {
    outline: none;
    border-color: var(--neon-purple);
    background: rgba(10, 10, 20, 0.95);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

/* Dark Dropdown Styling */
select.form-input {
    background-color: rgba(10, 10, 20, 0.95);
    color: white;
    cursor: pointer;
}

select.form-input option {
    background-color: #1a1a2e;
    color: white;
    padding: 8px;
}

select.form-input option:hover {
    background-color: #16213e;
}

/* Custom dropdown arrow */
select.form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.5rem;
    padding-right: 2.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--light-purple);
}

/* Buttons */
.btn-primary {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--primary-purple), var(--dark-purple));
    color: white;
    font-weight: 600;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    padding: 0.5rem 1rem;
    background: rgba(139, 92, 246, 0.2);
    color: var(--light-purple);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: var(--neon-purple);
}

/* Name Cards */
.name-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(192, 132, 252, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 15px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.name-card:hover {
    transform: scale(1.05);
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.name-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.name-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--neon-purple);
}

.compatibility-stars {
    display: flex;
    gap: 0.25rem;
}

.star {
    color: #374151;
    font-size: 0.875rem;
}

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

.clickable-star {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-star:hover {
    transform: scale(1.2);
    color: var(--gold);
    filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.5));
}

/* Charts Container */
.chart-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
    position: relative;
    overflow: hidden;
    max-height: 400px;
}

/* Prevent canvas from causing scrolling */
.chart-container canvas {
    max-width: 100% !important;
    height: auto !important;
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--light-purple);
    margin-bottom: 1rem;
}

/* Map Container */
.map-container {
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid rgba(139, 92, 246, 0.3);
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-content {
    visibility: hidden;
    background-color: rgba(15, 15, 30, 0.95);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 0.5rem;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* Loading Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(139, 92, 246, 0.3);
    border-top-color: var(--neon-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Floating Animation */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(139, 92, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
    }
}