/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', arial, sans-serif;
    background-color: #ffffff;
    color: #202124;
    line-height: 1.6;
}

/* Home page */
.home-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}


.home-title {
    font-size: 5.5rem;
    font-weight: 400;
    margin-bottom: 1.75rem;
    color: #4285f4;
    letter-spacing: 0;
    font-family: 'Roboto', arial, sans-serif;
    position: relative;
}

.home-title::first-letter {
    color: #ea4335;
}

.search-form {
    width: 100%;
    max-width: 584px;
    position: relative;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    fill: #9aa0a6;
    pointer-events: none;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1.5rem 0.875rem 3rem;
    font-size: 1rem;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    outline: none;
    transition: all 0.2s;
    background-color: #fff;
    box-shadow: 0 2px 5px 1px rgba(64, 60, 67, 0.16);
    font-family: arial, sans-serif;
}

.search-input:hover {
    box-shadow: 0 2px 8px 1px rgba(64, 60, 67, 0.28);
    border-color: rgba(223, 225, 229, 0);
}

.search-input:focus {
    box-shadow: 0 2px 8px 1px rgba(64, 60, 67, 0.28);
    border-color: rgba(223, 225, 229, 0);
    outline: none;
}

.search-buttons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.search-button {
    background-color: #f8f9fa;
    border: 1px solid #f8f9fa;
    border-radius: 4px;
    color: #3c4043;
    font-family: 'Roboto', arial, sans-serif;
    font-size: 0.875rem;
    margin: 0.6875rem 0.25rem;
    padding: 0 1rem;
    line-height: 1.6875rem;
    height: 2.25rem;
    min-width: 3.375rem;
    text-align: center;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    display: inline-block;
    transition: all 0.1s ease-in-out;
}

.search-button:hover {
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    background-color: #f8f9fa;
    border: 1px solid #dadce0;
    color: #202124;
}

.search-button:focus {
    border: 1px solid #4285f4;
    outline: none;
}

.lucky-button {
    background-color: #f8f9fa;
    border: 1px solid #f8f9fa;
}

/* Search page */
.search-page {
    max-width: 100%;
    margin: 0;
    padding: 0.5rem 2rem 2rem 180px;
}

@media (max-width: 1200px) {
    .search-page {
        padding: 1.25rem 2rem 2rem 120px;
    }
}

@media (max-width: 900px) {
    .search-page {
        padding: 1.25rem 1.5rem 2rem 1.5rem;
    }
}

.search-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    max-width: 100%;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 300;
    color: #333;
    text-decoration: none;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-link span {
    display: inline-block;
}

.header-logo {
    max-height: 45px;
    width: auto;
    height: auto;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.search-bar {
    flex: 1;
    min-width: 400px;
    max-width: 652px;
}

.filters {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #ebebeb;
    max-width: 652px;
}

.filter-label {
    font-weight: 500;
}

.filter-link {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #666;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.filter-link:hover {
    background-color: #f5f5f5;
}

.filter-link.active {
    background-color: #4285f4;
    color: white;
}

/* Results - Google style */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0;
    max-width: 652px;
    padding: 0;
}

.result-item {
    padding: 0;
    margin-bottom: 1.75rem;
    max-width: 100%;
}

.result-title-wrapper {
    margin-bottom: 0.1875rem;
}

.result-title {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.3;
    margin: 0;
    padding: 0;
}

.result-title a {
    color: #1a0dab;
    text-decoration: none;
    cursor: pointer;
}

.result-title a:visited {
    color: #681da8;
}

.result-title a:hover {
    text-decoration: underline;
}

.result-url {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.1875rem;
    line-height: 1.5;
    font-size: 0.875rem;
}

.url-text {
    color: #202124;
    font-size: 0.875rem;
    font-style: normal;
}

.result-type-badge {
    color: #70757a;
    font-size: 0.75rem;
    text-transform: uppercase;
    background: #f1f3f4;
    padding: 0.125rem 0.375rem;
    border-radius: 2px;
}

.result-style {
    color: #70757a;
    font-size: 0.875rem;
}

.result-snippet {
    line-height: 1.58;
    color: #4d5156;
    font-size: 0.875rem;
    margin-top: 0.1875rem;
}

.snippet-text {
    margin: 0.1875rem 0 0 0;
    color: #4d5156;
    font-size: 0.875rem;
    line-height: 1.58;
}

.video-preview {
    margin: 0.5rem 0;
}

.video-thumbnail {
    width: 100%;
    max-width: 600px;
    max-height: 400px;
    border-radius: 4px;
    background: #000;
}

.instagram-preview {
    margin: 0.5rem 0;
}

.instagram-link-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #1a73e8;
    text-decoration: none;
    font-size: 0.875rem;
}

.instagram-link-inline:hover {
    text-decoration: underline;
}

.instagram-icon-small {
    width: 16px;
    height: 16px;
    fill: #1a73e8;
    flex-shrink: 0;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

/* Admin page */
.admin-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-container h1 {
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 300;
}

.auth-info {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.auth-info code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9rem;
}

.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 2rem;
}

.admin-forms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

.admin-form-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 2rem;
    background: white;
}

.admin-form-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 400;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-input:focus {
    border-color: #4285f4;
}

.btn-primary {
    background: #4285f4;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background: #357ae8;
}

.result-success {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
}

.result-success h3 {
    margin-bottom: 0.5rem;
}

.result-success p {
    margin: 0.5rem 0;
}

.result-success a {
    color: #155724;
    text-decoration: underline;
}

.result-error {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
}

.result-error h3 {
    margin-bottom: 0.5rem;
}

.btn-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #4285f4;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn-link:hover {
    background: #357ae8;
}

/* Responsive */
@media (max-width: 768px) {
    .home-title {
        font-size: 3.5rem;
    }
    
    .search-input {
        max-width: 100%;
        padding: 0.75rem 1.25rem 0.75rem 2.5rem;
    }
    
    .search-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .search-button {
        width: 100%;
        max-width: 200px;
    }

    .search-page {
        padding: 1rem;
    }

    .search-header {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar {
        min-width: 100%;
        max-width: 100%;
    }

    .header-logo {
        max-height: 30px;
    }

    .logo-link {
        font-size: 1.2rem;
    }

    .results-list {
        max-width: 100%;
    }

    .video-thumbnail {
        max-width: 100%;
    }

    .admin-forms {
        grid-template-columns: 1fr;
    }
}
