/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: none;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f8f9fa;
    color: #2c3e50;
    line-height: 1.6;
    height: 100vh;
    overflow-x: hidden;
}

.container {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Main Search Page Styles */
.search-wrapper {
    text-align: center;
    padding: 30px;
    max-width: 700px;
    width: 100%;
    position: relative;
    transform: translateY(-50px);
    transition: transform 0.5s ease;
}

.logo-container {
    margin-bottom: 50px;
    transform: scale(0);
    animation: zoomIn 1s forwards 0.2s;
}

.logo {
    font-size: 70px;
    font-weight: 700;
    color: #3498db;
    letter-spacing: -2px;
    text-shadow: 0 2px 10px rgba(52, 152, 219, 0.15);
    transition: all 0.3s ease;
}

.dots {
    color: #e74c3c;
    animation: blink 1.5s infinite;
}

.search-bar-container {
    position: relative;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.8s forwards 0.7s;
}

#search-input {
    width: 100%;
    height: 60px;
    border-radius: 30px;
    border: none;
    background-color: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 0 30px;
    font-size: 18px;
    color: #2c3e50;
    transition: all 0.3s ease;
}

#search-input:focus {
    outline: none;
    box-shadow: 0 10px 40px rgba(52, 152, 219, 0.15);
}

#search-button {
    position: absolute;
    right: 5px;
    top: 5px;
    height: 50px;
    width: 50px;
    border-radius: 50%;
    border: none;
    background-color: #3498db;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#search-button:hover {
    background-color: #2980b9;
    transform: scale(1.05);
}

.pulse-container {
    position: absolute;
    left: 50%;
    bottom: -100px;
    transform: translateX(-50%);
    opacity: 0.5;
}

.pulse-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.2) 0%, rgba(52, 152, 219, 0) 70%);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 4s infinite;
}

.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
    animation-name: float-particle;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

/* Results Page Styles */
.results-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    font-family: 'Montserrat', sans-serif;
}

.results-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    background: white;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
    min-height: 100vh;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: white;
    border-bottom: 1px solid #e8ecf0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.mini-logo {
    font-size: 32px;
    font-weight: 700;
    margin-right: 40px;
    min-width: 150px;
}

.mini-logo a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mini-logo a:hover {
    color: #2980b9;
}

.search-bar-mini {
    position: relative;
    width: 100%;
    max-width: 700px;
    flex: 1;
}

.search-bar-mini input {
    width: 100%;
    height: 50px;
    border-radius: 25px;
    border: 2px solid #e8ecf0;
    padding: 0 25px 0 20px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafbfc;
    color: #2c3e50;
}

.search-bar-mini input:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-bar-mini button {
    position: absolute;
    right: 3px;
    top: 3px;
    height: 44px;
    width: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-bar-mini button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.results-content {
    padding: 30px;
}

.result-stats {
    color: #7f8c8d;
    font-size: 15px;
    margin-bottom: 25px;
    padding: 15px 0;
    border-bottom: 1px solid #ecf0f1;
}

.result-stats p {
    margin: 0;
    font-weight: 500;
}

.search-results {
    margin-top: 0;
    display: grid;
    gap: 20px;
}

.result-card {
    padding: 25px;
    margin-bottom: 0;
    border-radius: 15px;
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s forwards;
    position: relative;
    border: 1px solid #f1f3f4;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.result-card:hover::before {
    transform: scaleX(1);
}

.result-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-8px);
    border-color: #e3f2fd;
}

.result-card h3 {
    font-size: 22px;
    margin-bottom: 8px;
    line-height: 1.3;
    font-weight: 600;
}

.result-card h3 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    word-break: break-word;
}

.result-card h3 a:hover {
    color: #3498db;
}

.site-url {
    color: #27ae60;
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 500;
    background: #f8fff9;
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-block;
    border: 1px solid #e8f5e8;
}

.result-description {
    color: #5a6c7d;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.result-type {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.result-type::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.result-type:hover::before {
    left: 100%;
}

.website-result {
    border-left: 4px solid #3498db;
}

.website-result .result-type {
    background: linear-gradient(135deg, #3498db, #5dade2);
    color: white;
}

.page-result {
    border-left: 4px solid #2ecc71;
}

.page-result .result-type {
    background: linear-gradient(135deg, #2ecc71, #58d68d);
    color: white;
}

.no-results {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.no-results h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #2c3e50;
    font-weight: 700;
}

.no-results p {
    color: #7f8c8d;
    font-size: 16px;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

/* Enhanced Animation Delays */
.result-card:nth-child(1) { animation-delay: 0.1s; }
.result-card:nth-child(2) { animation-delay: 0.2s; }
.result-card:nth-child(3) { animation-delay: 0.3s; }
.result-card:nth-child(4) { animation-delay: 0.4s; }
.result-card:nth-child(5) { animation-delay: 0.5s; }
.result-card:nth-child(n+6) { animation-delay: 0.6s; }

.debug-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    font-size: 14px;
    color: #7f8c8d;
    text-align: left;
}

/* Relevance indicators */
.result-card {
    position: relative;
    border-left: 4px solid transparent;
}

.result-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 15px;
}

.result-card.high-relevance {
    border-left-color: #27ae60;
}

.result-card.medium-relevance {
    border-left-color: #f39c12;
}

.result-card.low-relevance {
    border-left-color: #e74c3c;
}

.result-card.high-relevance::before {
    background-color: #27ae60;
}

.result-card.medium-relevance::before {
    background-color: #f39c12;
}

.result-card.low-relevance::before {
    background-color: #e74c3c;
}

.relevance-score {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 12px;
    color: #7f8c8d;
}

/* Footer */
footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 20px;
    text-align: center;
    background: transparent;
    z-index: 10;
}

.footer-content {
    font-size: 14px;
    color: #7f8c8d;
}

.footer-content a {
    color: #3498db;
    text-decoration: none;
    margin-right: 15px;
    transition: color 0.3s;
}

/* Advanced Search Styling */
.toggle-advanced-search {
    margin-top: 15px;
    color: #7f8c8d;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.toggle-advanced-search:hover {
    color: #3498db;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.toggle-advanced-search.active .toggle-icon {
    transform: rotate(180deg);
}

.advanced-search-options {
    margin-top: 15px;
    display: none; /* Hidden by default */
    text-align: left;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.advanced-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.option-group {
    margin-bottom: 15px;
}

.option-group label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 500;
    font-size: 14px;
}

.checkbox-group-label {
    margin-bottom: 10px;
}

.checkbox-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.checkbox-label {
    margin-left: 5px !important;
    margin-bottom: 0 !important;
    font-weight: normal !important;
    cursor: pointer;
}

/* Custom select styling */
.select-styled {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #2c3e50;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232c3e50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-styled:hover,
.select-styled:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
    background-color: #3498db;
    border-color: #3498db;
}

input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    width: 5px;
    height: 10px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    top: 1px;
    left: 5px;
    transform: rotate(45deg);
}

input[type="checkbox"]:hover {
    border-color: #3498db;
}

@keyframes zoomIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.3;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.6;
    }
}

@keyframes float-particle {
    0% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(20px, -20px);
    }
    100% {
        transform: translate(0, 0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Bulgarian text support */
@font-face {
    font-family: 'Noto Sans';
    font-style: normal;
    font-weight: 400;
    src: url(https://fonts.gstatic.com/s/notosans/v28/o-0IIpQlx3QUlC5A4PNr5TRG.woff2) format('woff2');
    unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

.bulgarian-text {
    font-family: 'Noto Sans', 'Montserrat', sans-serif;
}

/* Make sure input fields support Bulgarian text */
input[type="text"], 
input[type="search"], 
textarea {
    font-family: 'Noto Sans', 'Montserrat', sans-serif;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .results-container {
        max-width: 100%;
        margin: 0;
    }
    
    .page-preview-container {
        width: 350px;
    }
    
    .results-content {
        padding: 25px;
    }
}

@media (max-width: 992px) {
    .page-preview-container {
        display: none;
    }
    
    .results-header {
        padding: 15px 20px;
    }
    
    .mini-logo {
        font-size: 28px;
        margin-right: 20px;
        min-width: 120px;
    }
    
    .search-bar-mini input {
        height: 45px;
        font-size: 15px;
    }
    
    .search-bar-mini button {
        height: 39px;
        width: 39px;
    }
}

@media (max-width: 768px) {
    .results-header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
        align-items: stretch;
    }
    
    .mini-logo {
        margin-right: 0;
        text-align: center;
        font-size: 26px;
    }
    
    .search-bar-mini {
        max-width: 100%;
    }
    
    .results-content {
        padding: 20px;
    }
    
    .result-card {
        padding: 20px;
        border-radius: 12px;
    }
    
    .result-card h3 {
        font-size: 20px;
    }
    
    .result-description {
        font-size: 15px;
    }
    
    .site-url {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .no-results {
        padding: 60px 20px;
    }
    
    .no-results h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .results-header {
        padding: 15px;
    }
    
    .mini-logo {
        font-size: 22px;
    }
    
    .search-bar-mini input {
        height: 42px;
        font-size: 14px;
        padding: 0 50px 0 15px;
    }
    
    .search-bar-mini button {
        height: 36px;
        width: 36px;
        right: 3px;
        top: 3px;
    }
    
    .results-content {
        padding: 15px;
    }
    
    .result-card {
        padding: 15px;
        border-radius: 10px;
    }
    
    .result-card h3 {
        font-size: 18px;
        margin-bottom: 6px;
    }
    
    .result-description {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .site-url {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .result-type {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .result-stats {
        font-size: 14px;
        padding: 10px 0;
    }
    
    .no-results {
        padding: 40px 15px;
    }
    
    .no-results h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .no-results p {
        font-size: 14px;
    }
}

@media (max-width: 320px) {
    .results-header {
        padding: 10px;
    }
    
    .results-content {
        padding: 10px;
    }
    
    .result-card {
        padding: 12px;
    }
    
    .mini-logo {
        font-size: 20px;
    }
    
    .search-bar-mini input {
        height: 38px;
        font-size: 13px;
    }
    
    .search-bar-mini button {
        height: 32px;
        width: 32px;
    }
}

/* Page Preview Styles - Enhanced */
.page-preview-container {
    position: fixed;
    top: 50%;
    right: -450px;
    transform: translateY(-50%);
    width: 400px;
    height: 70vh;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    border: 1px solid #e8ecf0;
}

.page-preview-container.visible {
    right: 30px;
    opacity: 1;
    pointer-events: auto;
}

.page-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #e8ecf0;
}

.preview-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.preview-visit {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 12px;
    color: white;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-visit:hover {
    background: linear-gradient(135deg, #2980b9, #1f4e79);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.page-preview-content {
    height: calc(100% - 60px);
    overflow: hidden;
    position: relative;
}

.preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.preview-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.preview-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.preview-loading::after {
    content: 'Loading preview...';
    color: #7f8c8d;
    font-size: 14px;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Add hover effect to search results */
.result-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.result-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Enhanced Result Tabs Styling */
.result-tabs {
    margin-bottom: 30px;
    border-bottom: 1px solid #e8ecf0;
    background: white;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tabs-container {
    display: flex;
    align-items: center;
    padding: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 24px;
    text-decoration: none;
    color: #6c757d;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    border-bottom: 3px solid transparent;
    background: transparent;
    min-width: 120px;
    justify-content: center;
}

.tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(46, 204, 113, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.tab:hover::before {
    opacity: 1;
}

.tab:hover {
    color: #495057;
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
}

.tab.active {
    color: #3498db;
    background: white;
    border-bottom-color: #3498db;
    font-weight: 600;
    box-shadow: 0 -2px 10px rgba(52, 152, 219, 0.1);
}

.tab.active::before {
    opacity: 0;
}

.tab-icon {
    transition: transform 0.3s ease;
}

.tab:hover .tab-icon {
    transform: scale(1.1);
}

.tab.active .tab-icon {
    transform: scale(1.05);
    stroke: #3498db;
}

.result-count {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    line-height: 1;
}

.tab.active .result-count {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

/* Enhanced Image Results Grid */
.search-results.image-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.image-result-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s forwards;
    border: 1px solid #f1f3f4;
}

.image-result-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: #e3f2fd;
}

.image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.image-result-card:hover .image-container img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(52, 152, 219, 0.7));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-result-card:hover .image-overlay {
    opacity: 1;
}

.image-actions {
    display: flex;
    gap: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: white;
    transform: scale(1.1);
    color: #3498db;
}

.view-btn:hover {
    color: #e74c3c;
}

.source-btn:hover {
    color: #27ae60;
}

.image-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #bdc3c7;
    background: #f8f9fa;
}

.image-error p {
    margin-top: 10px;
    font-size: 14px;
    color: #7f8c8d;
}

.image-meta {
    padding: 20px;
}

.image-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
    word-break: break-word;
}

.image-source {
    margin-bottom: 10px;
}

.source-domain {
    display: inline-block;
    padding: 4px 10px;
    background: #e8f5e8;
    color: #27ae60;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #d5edda;
}

.image-description {
    color: #5a6c7d;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.relevance-badge-container {
    display: flex;
    justify-content: flex-end;
}

.relevance-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.relevance-badge.high {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.relevance-badge.medium {
    background: linear-gradient(135deg, #f39c12, #f1c40f);
    color: white;
}

.relevance-badge.low {
    background: linear-gradient(135deg, #95a5a6, #bdc3c7);
    color: white;
}

/* Animation delays for image cards */
.image-result-card:nth-child(1) { animation-delay: 0.1s; }
.image-result-card:nth-child(2) { animation-delay: 0.15s; }
.image-result-card:nth-child(3) { animation-delay: 0.2s; }
.image-result-card:nth-child(4) { animation-delay: 0.25s; }
.image-result-card:nth-child(5) { animation-delay: 0.3s; }
.image-result-card:nth-child(6) { animation-delay: 0.35s; }
.image-result-card:nth-child(n+7) { animation-delay: 0.4s; }

/* Responsive adjustments for tabs */
@media (max-width: 768px) {
    .tabs-container {
        flex-wrap: wrap;
        gap: 0;
    }
    
    .tab {
        flex: 1;
        min-width: auto;
        padding: 15px 12px;
        font-size: 13px;
    }
    
    .tab span {
        display: none;
    }
    
    .tab-icon {
        margin: 0;
    }
    
    .result-count {
        position: absolute;
        top: 5px;
        right: 5px;
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .search-results.image-results {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .image-container {
        height: 180px;
    }
    
    .image-meta {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .search-results.image-results {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }
    
    .image-container {
        height: 150px;
    }
    
    .image-meta {
        padding: 12px;
    }
    
    .image-title {
        font-size: 14px;
    }
    
    .image-description {
        font-size: 13px;
    }
    
    .action-btn {
        width: 40px;
        height: 40px;
    }
    
    .tab {
        padding: 12px 8px;
    }
}

@media (max-width: 320px) {
    .search-results.image-results {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .image-container {
        height: 180px;
    }
}

/* Video Results Styling */
.video-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

.video-result-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: #3b82f6;
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #0f172a;
    overflow: hidden;
}

.video-container video,
.youtube-container iframe,
.vimeo-container iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-fallback {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-placeholder {
    color: #64748b;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-fallback:hover .video-overlay {
    opacity: 1;
}

.play-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: rgba(59, 130, 246, 0.9);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.play-button:hover {
    background: #3b82f6;
    transform: scale(1.1);
}

.video-overlay-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container:hover .video-overlay-actions {
    opacity: 1;
}

.video-actions {
    display: flex;
    gap: 8px;
}

.video-meta {
    padding: 16px;
}

.video-title {
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-source {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.source-domain {
    color: #64748b;
    font-size: 14px;
}

.video-type-badge {
    background: #374151;
    color: #d1d5db;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.video-description {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 12px;
}

/* Responsive video grid */
@media (max-width: 768px) {
    .video-results {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px 0;
    }
    
    .video-meta {
        padding: 12px;
    }
    
    .video-overlay-actions {
        top: 8px;
        right: 8px;
    }
    
    .video-actions .action-btn {
        width: 32px;
        height: 32px;
        padding: 6px;
    }
}
