/* Token Analyzer V2 - Galaxy Theme */

/* Navigation Active State for Token Analyzer - Removed to use default dashboard.css active styling */

/* Override content wrapper for galaxy background */
.content-wrapper {
    position: relative;
    overflow-y: auto;
    height: 100%;
}

/* Override dashboard section for analyzer */
.token-analyzer-section {
    position: relative;
    flex: 1;
    overflow-y: auto;
    padding: 0 !important;
    background: transparent;
    height: 100%;
}

/* Ensure consistent header spacing */
.token-analyzer-section .dashboard-header {
    display: none; /* Hide duplicate header in token analyzer section */
}

.analyzer-content {
    padding: 30px;
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Animated Background */
.galaxy-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000000;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 40px 70px, white, transparent),
        radial-gradient(1px 1px at 50px 160px, white, transparent),
        radial-gradient(1px 1px at 130px 40px, white, transparent);
    background-size: 200px 200px;
    animation: zoom 10s infinite;
    opacity: 0.3;
}

@keyframes zoom {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.nebula {
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background: radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.05), transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.05), transparent 50%);
    animation: nebula-float 20s ease-in-out infinite;
    opacity: 0.3;
}

@keyframes nebula-float {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto 60px auto;
    padding: 0 20px;
}

@media (max-width: 1024px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

.tool-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.tool-card:hover::before {
    transform: translateX(100%);
}

.tool-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Tool Icons - White */
.tool-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 20px;
    color: #FFFFFF;
    opacity: 0.9;
    transition: opacity 0.3s, transform 0.3s;
}

.tool-card:hover .tool-icon {
    opacity: 1;
    transform: scale(1.1);
}

.tool-card h3 {
    font-size: 20px;
    font-weight: 400;
    color: #FFFFFF;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.tool-card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    font-weight: 300;
}

/* Analysis Modal - Black & White */
.analysis-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
}

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

.modal-content {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.modal-content:hover::before {
    transform: translateX(100%);
}

.analysis-modal.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    position: relative;
    z-index: 10;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 400;
    color: #FFFFFF;
    letter-spacing: 0.5px;
}

.close-modal {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    line-height: 1;
}

.close-modal:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
}

/* Input Section */
.modal-input-section {
    margin-bottom: 40px;
    position: relative;
    z-index: 10;
}

.modal-input-section > * + * {
    margin-top: 24px;
}

.input-wrapper {
    position: relative;
}

.modal-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
    font-weight: 300;
    letter-spacing: 0.3px;
}

.input-label {
    display: block;
    margin-bottom: 12px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Modal Organization */
.modal-body {
    position: relative;
    z-index: 10;
}

.modal-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 32px -48px;
    position: relative;
    z-index: 10;
}

.modal-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
}

.modal-input:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Analyze Button - Black & White */
.analyze-button {
    width: 100%;
    padding: 16px 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.5px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.analyze-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.analyze-button::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

.analyze-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.analyze-button:hover::after {
    opacity: 1;
    animation: borderAnimation 3s linear infinite;
}

.analyze-button:hover::before {
    width: 300px;
    height: 300px;
}

/* Animated Stars Background for Modal */
.modal-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.modal-stars::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 50px 160px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 130px 40px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 80px 120px, rgba(255, 255, 255, 0.3), transparent);
    background-size: 200px 200px;
    animation: starMove 20s linear infinite;
    opacity: 0.5;
}

.modal-stars::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 90px 90px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 130px 160px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 20px 140px, rgba(255, 255, 255, 0.3), transparent);
    background-size: 300px 300px;
    animation: starMove 30s linear infinite reverse;
    opacity: 0.3;
}

@keyframes starMove {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-200px);
    }
}

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

.analyze-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Analysis Process Animation */
.analysis-process {
    display: none;
    padding: 60px 0;
    text-align: center;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Token Analyzer Section */
    .analyzer-content {
        padding: 20px;
    }
    
    /* Tools Grid */
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0;
    }
    
    .tool-card {
        padding: 24px;
    }
    
    .tool-card h3 {
        font-size: 18px;
    }
    
    .tool-card p {
        font-size: 13px;
    }
    
    .tool-icon {
        width: 28px;
        height: 28px;
        margin-bottom: 16px;
    }
    
    /* Modal Responsive */
    .modal-content {
        width: 95%;
        max-width: none;
        padding: 32px 24px;
        margin: 20px auto;
        border-radius: 16px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .modal-input-section > * + * {
        margin-top: 20px;
    }
    
    .input-label {
        font-size: 14px;
    }
    
    .modal-input {
        font-size: 16px; /* Prevent iOS zoom */
        padding: 14px 16px;
    }
    
    .analyze-button {
        font-size: 16px;
        padding: 14px 24px;
    }
    
    /* Analysis Process Mobile */
    .analysis-process {
        padding: 40px 20px;
    }
    
    .process-step {
        margin-bottom: 30px;
    }
    
    .process-title {
        font-size: 18px;
    }
    
    .process-description {
        font-size: 14px;
    }
    
    .process-icon {
        width: 50px;
        height: 50px;
    }
    
    .orbit-1 {
        width: 50px;
        height: 50px;
    }
    
    .orbit-2 {
        width: 35px;
        height: 35px;
        top: 7.5px;
        left: 7.5px;
    }
    
    .orbit-3 {
        width: 20px;
        height: 20px;
        top: 15px;
        left: 15px;
    }
    
    /* Disable animations on mobile for performance */
    .modal-stars {
        display: none;
    }
    
    /* Success state mobile */
    .success-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    
    .success-circle {
        width: 60px;
        height: 60px;
    }
    
    .view-results-btn {
        font-size: 14px;
        padding: 12px 32px;
    }
}

.analysis-process.active {
    display: block;
}

.process-step {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards;
    margin-bottom: 40px;
}

.process-step:nth-child(1) { animation-delay: 0.2s; }
.process-step:nth-child(2) { animation-delay: 0.8s; }
.process-step:nth-child(3) { animation-delay: 1.4s; }
.process-step:nth-child(4) { animation-delay: 2.0s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.process-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    position: relative;
}

.orbit {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: rotate 3s linear infinite;
}

.orbit-1 {
    width: 60px;
    height: 60px;
    top: 0;
    left: 0;
}

.orbit-2 {
    width: 40px;
    height: 40px;
    top: 10px;
    left: 10px;
    animation-direction: reverse;
}

.orbit-3 {
    width: 20px;
    height: 20px;
    top: 20px;
    left: 20px;
}

.orbit-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #FFFFFF;
    border-radius: 50%;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
}

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

.process-title {
    font-size: 20px;
    color: #FFFFFF;
    margin-bottom: 8px;
    font-weight: 300;
    letter-spacing: 1px;
}

.process-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

/* Loading Bar */
.loading-bar {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 40px;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: loading 2s linear infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Success State */
.analysis-complete {
    opacity: 0;
    transform: scale(0.9);
    animation: scaleIn 0.5s forwards;
}

@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    position: relative;
}

.success-circle {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

.view-results-btn {
    display: inline-block;
    padding: 14px 40px;
    background: #FFFFFF;
    color: #000000;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 400;
    letter-spacing: 1px;
    transition: all 0.3s;
    margin-top: 20px;
}

.view-results-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}