/* Homepage Styles */

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(156, 238, 105, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(16, 17, 20, 0.1) 0%, transparent 50%),
        #000000;
    overflow-x: hidden !important;
}

/* Blur-Overlay für Background unter hero-content */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 5; /* Zwischen Background (z-index: 1-2) und hero-content (z-index: 10) */
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    z-index: 10;
    position: relative;
    overflow: visible !important;
}

.hero-title {
    font-family: 'Quinn', sans-serif;
    font-size: clamp(5rem, 5vw, 8rem);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1;
    color: #9cee69;
    position: relative;
    z-index: 15;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    font-weight: 400;
    position: relative;
    z-index: 15;
}

/* Search Section */
.search-section {
    margin: 50px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 15;
    overflow: visible !important;
}

.lexicon-search-container {
    width: 100%;
    margin: 20px 0;
    position: relative;
    z-index: 15;
    overflow: visible !important;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.lexicon-search-input {
    width: 100% !important;
    height: 70px !important;
    padding: 20px 60px 20px 25px !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 15px !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px) !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
    color: #ffffff !important;
    font-size: 18px !important;
    font-family: 'Manrope', sans-serif !important;
    font-weight: 500 !important;
}

.lexicon-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
    opacity: 1 !important;
}

.lexicon-search-input:focus {
    outline: none !important;
    border-color: #9cee69 !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 0 30px rgba(156, 238, 105, 0.3) !important;
}

.search-clear-btn {
    position: absolute;
    right: 100px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: bold;
    line-height: 1;
    padding: 5px;
    user-select: none;
    transition: color 0.3s ease;
}

.search-clear-btn:hover {
    color: #ffffff;
}

.search-status {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    max-height: 400px;
    overflow-y: auto;
    background-color: #000000 !important;
    backdrop-filter: blur(20px);
    display: none;
    z-index: 99999;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    margin-top: 10px;
    width: 100%;
    min-height: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 238, 105, 0.5) transparent;
}

/* Webkit Scrollbar Styling */
.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb {
    background: rgba(156, 238, 105, 0.5);
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 238, 105, 0.7);
}

/* ===== FIXED: HOMEPAGE SEARCH RESULT ITEMS LAYOUT ===== */
.homepage .search-result-item,
.hero-section .search-result-item {
    display: block !important; /* Changed from flex to block */
    padding: 20px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    background-color: transparent !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.homepage .search-result-item:last-child,
.hero-section .search-result-item:last-child {
    border-bottom: none !important;
}

.homepage .search-result-item:hover,
.homepage .search-result-item.active,
.hero-section .search-result-item:hover,
.hero-section .search-result-item.active {
    background-color: rgba(156, 238, 105, 0.1) !important;
    transform: translateX(5px) !important;
}

/* FIXED: Result Content Layout - Title and Excerpt stacked vertically */
.homepage .result-title,
.hero-section .result-title {
    font-weight: 700 !important;
    margin-bottom: 8px !important;
    color: #ffffff !important;
    font-size: 16px !important;
    text-align: left !important;
    padding-right: 80px !important;
    word-wrap: break-word !important;
    white-space: normal !important;
    display: block !important; /* Ensure block display */
}

.homepage .result-excerpt,
.hero-section .result-excerpt {
    color: rgba(255, 255, 255, 0.8) !important;
    line-height: 1.5 !important;
    font-size: 14px !important;
    text-align: left !important;
    padding-right: 80px !important;
    word-wrap: break-word !important;
    white-space: normal !important;
    display: block !important; /* Ensure block display */
    margin-top: 0 !important;
}

/* FIXED: Score positioning for homepage */
.homepage .result-score,
.hero-section .result-score {
    position: absolute !important;
    top: 15px !important;
    right: 20px !important;
    display: flex !important;
    align-items: center !important;
    flex-direction: row !important; /* Changed from column to row for homepage */
    gap: 10px !important;
}

.homepage .score-text,
.hero-section .score-text {
    color: rgba(255, 255, 255, 0.8) !important;
    min-width: 35px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    order: 1 !important;
}

.homepage .score-bar,
.hero-section .score-bar {
    width: 60px !important;
    height: 8px !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    order: 2 !important;
}

.homepage .score-fill,
.hero-section .score-fill {
    height: 100% !important;
    border-radius: 4px !important;
    transition: width 0.3s ease !important;
}

.homepage .score-high .score-fill,
.hero-section .score-high .score-fill {
    background: linear-gradient(90deg, #9cee69, #7dd945) !important;
}

.homepage .score-medium .score-fill,
.hero-section .score-medium .score-fill {
    background: linear-gradient(90deg, #ffc107, #fd7e14) !important;
}

.homepage .score-low .score-fill,
.hero-section .score-low .score-fill {
    background: linear-gradient(90deg, #dc3545, #e83e8c) !important;
}

.highlight {
    background-color: rgba(156, 238, 105, 0.3);
    padding: 2px 4px;
    border-radius: 4px;
    color: #ffffff;
}

.no-results, .loading {
    padding: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.loading::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(156, 238, 105, 0.3);
    border-top: 2px solid #9cee69;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

/* Crypto Coins Background - Only inside hero-section */
.hero-section .crypto-coins-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible !important;
    z-index: 1;
    pointer-events: none;
    /* Zusätzlicher Blur auf die Crypto-Icons für subtileren Effekt */
    filter: blur(2px) opacity(0.4);
    -webkit-filter: blur(2px) opacity(0.4);
}

/* Crypto coin individual elements */
.crypto-coin {
    position: absolute !important;
    opacity: 0.6 !important;
    z-index: 2 !important;
    display: block !important;
    visibility: visible !important;
    pointer-events: none;
}

.crypto-coin img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    opacity: 1 !important;
    display: block !important;
    filter: drop-shadow(0 2px 8px rgba(156, 238, 105, 0.2));
}

/* Hide crypto coins on non-homepage */
.crypto-coins-background {
    display: none;
}

/* Force show on homepage */
.homepage .crypto-coins-background,
.home .crypto-coins-background {
    display: block !important;
}

@keyframes coinFadeIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.5);
    }
    to {
        opacity: 1 !important;
        transform: translateY(0) scale(1);
    }
}

@keyframes coinFloat {
    0%, 100% { 
        transform: translateY(0px) translateX(0px) rotate(0deg); 
    }
    25% { 
        transform: translateY(-30px) translateX(20px) rotate(90deg); 
    }
    50% { 
        transform: translateY(-10px) translateX(-15px) rotate(180deg); 
    }
    75% { 
        transform: translateY(-25px) translateX(10px) rotate(270deg); 
    }
}

@keyframes coinGentleFloat {
    0%, 100% { 
        transform: translateY(0px) translateX(0px); 
    }
    25% { 
        transform: translateY(-15px) translateX(8px); 
    }
    50% { 
        transform: translateY(-5px) translateX(-12px); 
    }
    75% { 
        transform: translateY(-20px) translateX(5px); 
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* CTA Link */
.cta-link {
    margin-top: 30px;
    position: relative;
    z-index: 5;
}

.cta-link a {
    color: #9cee69;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.cta-link a:hover {
    color: #ffffff;
}

.cta-link a::after {
    content: ' →';
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.3s ease;
}

.cta-link a:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Homepage Mobile Styles */
    .hero-title {
        font-size: 2.5rem;
    }

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

    .lexicon-search-input {
        height: 60px !important;
        font-size: 16px !important;
        padding: 15px 50px 15px 20px !important;
    }

    .search-results {
        border-radius: 10px;
        max-height: 60vh;
        left: -10px;
        right: -10px;
        width: calc(100% + 20px);
    }

    .search-result-item {
        padding: 15px;
    }
    
    .homepage .result-title,
    .homepage .result-excerpt,
    .hero-section .result-title,
    .hero-section .result-excerpt {
        padding-right: 60px;
    }
    
    .search-section {
        margin: 30px 0;
        max-width: 100%;
        padding: 0px;
    }
    
    .hero-content {
        padding: 0 10px;
        overflow: visible !important;
    }
    
    .crypto-coin {
        opacity: 0.3 !important;
        transform: scale(0.7) !important;
    }
    
    .crypto-coin:nth-child(n+7) {
        display: none;
    }
}

@media (max-width: 480px) {
    .search-results {
        max-height: 50vh;
        border-radius: 10px;
    }
    
    .search-result-item {
        padding: 15px;
    }
    
    .homepage .result-title,
    .homepage .result-excerpt,
    .hero-section .result-title,
    .hero-section .result-excerpt {
        padding-right: 50px;
    }
    
    .crypto-coin:nth-child(n+5) {
        display: none;
    }
}