/* ========== MODERN DASHBOARD STYLES ========== */

/* Search Panel Container with Border */
.search-panel-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 1, 24, 0.4);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Top gradient border line */
.search-panel-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(168, 85, 247, 1), transparent);
    opacity: 0.5;
}

/* Background gradient overlay */
.search-panel-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(168, 85, 247, 0.05) 0%, transparent 50%, rgba(59, 130, 246, 0.05) 100%);
    pointer-events: none;
}

/* Modern Search Panel Container */
.modern-search-panel {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 2rem 1.5rem;
}

@media (max-width: 768px) {
    .modern-search-panel {
        padding: 1.5rem 1rem;
    }
}

/* Search Input Wrapper */
.modern-search-input-wrapper {
    margin-bottom: 1.5rem;
}

.modern-search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: #130a2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 0.375rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 80px;
}

.modern-search-input-container:focus-within {
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.15);
}

/* Scan Icon */
.scan-icon-wrapper {
    position: absolute;
    left: 1.5rem;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
}

.scan-icon {
    color: rgba(156, 163, 175, 1);
    width: 24px;
    height: 24px;
    transition: color 0.3s ease;
}

.modern-search-input-container:focus-within .scan-icon {
    color: rgba(168, 85, 247, 0.8);
}

/* Search Input */
.modern-search-input {
    flex: 1;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 500;
    padding-left: 4rem;
    padding-right: 12rem;
}

.modern-search-input::placeholder {
    color: rgba(156, 163, 175, 0.6);
}

/* Right Buttons Container */
.search-right-buttons {
    position: absolute;
    right: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Settings Button */
.settings-btn-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: transparent;
    border: none;
    border-radius: 0.75rem;
    color: rgba(156, 163, 175, 1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-btn-modern:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.settings-btn-modern svg {
    width: 20px;
    height: 20px;
}

/* Search Button with Gradient */
.search-btn-gradient {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(180deg, #683FEA 49.18%, #A47CF3 113.93%);
    border: none;
    border-radius: 9999px;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 -6px 20px -4px rgba(255, 255, 255, 0.5),
        0 6px 20px -4px rgba(255, 255, 255, 0.3),
        0 4px 14px 0 rgba(0, 0, 0, 0.1),
        0 -2px 0 0 rgba(0, 0, 0, 0.20) inset,
        0 1px 0 0 rgba(255, 255, 255, 0.40) inset;
}

.search-btn-gradient:hover:not(:disabled) {
    filter: brightness(1.1);
}

.search-btn-gradient:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.search-btn-text {
    display: none;
}

@media (min-width: 640px) {
    .search-btn-text {
        display: inline;
    }
}

.search-btn-gradient svg {
    width: 16px;
    height: 16px;
}

/* Search Options Modern */
.search-options-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0 0.25rem;
    margin-bottom: 1rem;
}

/* Mode Toggle Modern */
.mode-toggle-modern {
    display: flex;
    align-items: center;
    padding: 0.25rem;
    background: #130a2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
}

.mode-btn-modern {
    padding: 0.375rem 1rem;
    background: transparent;
    border: none;
    border-radius: 9999px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.mode-btn-modern.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.mode-btn-modern:hover:not(.active) {
    color: rgba(255, 255, 255, 0.8);
}

/* Info Badges */
.info-badges {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.info-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(209, 213, 219, 1);
    font-size: 0.875rem;
}

.info-badge svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.info-badge:nth-child(1) svg {
    color: rgba(168, 85, 247, 1);
}

.info-badge:nth-child(2) svg {
    color: rgba(96, 165, 250, 1);
}

.info-badge span {
    display: none;
}

@media (min-width: 640px) {
    .info-badge span {
        display: inline;
    }
}

/* Manual Search Section */
.manual-search-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Categories Pills */
.categories-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.category-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    color: rgba(156, 163, 175, 1);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.category-pill svg {
    width: 14px;
    height: 14px;
    color: rgba(156, 163, 175, 1);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.category-pill:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(209, 213, 219, 1);
}

.category-pill:hover svg {
    color: rgba(209, 213, 219, 1);
}

.category-pill.active {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
    color: rgba(239, 68, 68, 1);
}

.category-pill.active svg {
    color: rgba(239, 68, 68, 1);
}

/* Modules Grid Modern */
.modules-grid-modern {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    min-height: 42px;
}

/* Module Card Modern */
.module-card-modern {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(19, 10, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    color: rgba(156, 163, 175, 1);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.module-card-modern svg {
    width: 18px;
    height: 18px;
    color: rgba(156, 163, 175, 0.7);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.module-card-modern:hover {
    background: rgba(26, 13, 53, 1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-2px);
}

.module-card-modern:hover svg {
    color: rgba(239, 68, 68, 1);
}

/* Module Tooltip */
.module-tooltip {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: rgba(209, 213, 219, 1);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 50;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
}

.module-card-modern:hover .module-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

.tooltip-title {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.125rem;
}

.tooltip-desc {
    color: rgba(156, 163, 175, 1);
    max-width: 220px;
    white-space: normal;
}

/* Add arrow to tooltip */
.module-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-1px);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-search-input-container {
        height: 64px;
        padding: 0.25rem;
    }

    .scan-icon-wrapper {
        left: 1rem;
    }

    .modern-search-input {
        font-size: 1rem;
        padding-left: 3rem;
        padding-right: 8rem;
    }

    .search-right-buttons {
        right: 0.25rem;
    }

    .search-btn-gradient {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }

    .search-options-modern {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .mode-toggle-modern {
        width: 100%;
        justify-content: center;
    }

    .mode-btn-modern {
        flex: 1;
        text-align: center;
    }

    .info-badges {
        justify-content: center;
        gap: 1rem;
    }

    .categories-pills {
        gap: 0.375rem;
        justify-content: flex-start;
    }

    .category-pill {
        padding: 0.375rem 0.625rem;
        font-size: 0.7rem;
    }

    .category-pill svg {
        width: 12px;
        height: 12px;
    }

    .modules-grid-modern {
        grid-template-columns: 1fr;
    }

    .module-card-modern {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .modern-search-input-container {
        height: 56px;
    }

    .modern-search-input {
        font-size: 0.875rem;
        padding-left: 2.75rem;
        padding-right: 7rem;
    }

    .search-btn-gradient {
        padding: 0.5rem 0.875rem;
    }
}

/* Animation for mode switch */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.manual-search-section {
    animation: fadeIn 0.3s ease;
}
