* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 2.5rem;
    font-weight: 700;
}

.subtitle {
    color: #718096;
    font-size: 1.1rem;
}

.search-form {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8fafc;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #4299e1;
    background: white;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* 下拉复选框样式 */
.country-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-trigger {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.dropdown-trigger:hover {
    border-color: #cbd5e0;
    background: white;
}

.dropdown-trigger.active {
    border-color: #4299e1;
    background: white;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    color: #718096;
}

.dropdown-trigger.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    z-index: 1000;
    margin-top: 4px;
    display: none;
}

.dropdown-content.show {
    display: block;
}

.dropdown-search {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.dropdown-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #f8fafc;
}

.dropdown-search input:focus {
    outline: none;
    border-color: #4299e1;
    background: white;
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.1);
}

.dropdown-options {
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
}

.dropdown-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    margin-bottom: 2px;
}

.dropdown-option:hover {
    background: #f7fafc;
}

.dropdown-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 10px;
    accent-color: #667eea;
    cursor: pointer;
}

.dropdown-option input[type="checkbox"]:checked + span {
    color: #667eea;
    font-weight: 600;
}

.dropdown-option span {
    flex: 1;
    cursor: pointer;
    user-select: none;
}

.dropdown-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 8px 12px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
}

.dropdown-actions button {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    color: #4a5568;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-actions button:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.dropdown-actions button:last-child:hover {
    background: #e53e3e;
    border-color: #e53e3e;
}

.form-hint {
    font-size: 12px;
    color: #718096;
    margin-top: 4px;
    font-style: italic;
}

.textarea-container {
    position: relative;
}

.polish-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
    z-index: 10;
}

.polish-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.5);
}

.polish-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.polish-btn.loading {
    animation: polishSpin 1s linear infinite;
}

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

.search-type-tabs, .platform-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-type-tab, .platform-tab {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    font-size: 13px;
    color: #4a5568;
    white-space: nowrap;
}

.search-type-tab:hover, .platform-tab:hover {
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

.search-type-tab.active, .platform-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.search-type-tab.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8fafc;
    color: #a0aec0;
}

.search-type-tab.disabled:hover {
    transform: none;
    border-color: #e2e8f0;
}

.search-type-hint {
    font-size: 12px;
    color: #718096;
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 36px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 220px;
    margin: 20px auto 0;
    display: block;
    position: relative;
    overflow: hidden;
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.search-btn:hover::before {
    left: 100%;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #718096;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.loading p {
    font-size: 16px;
    margin-bottom: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f1f5f9;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

.results {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.blogger-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
    overflow: hidden;
}

.blogger-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.blogger-info {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.blogger-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f1f5f9;
    transition: all 0.3s ease;
}

.blogger-avatar:hover {
    transform: scale(1.1);
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.blogger-details h3 {
    margin: 0 0 5px 0;
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
}

.blogger-details p {
    margin: 0;
    color: #718096;
    font-size: 14px;
}

.score {
    margin-left: auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.post-image {
    width: 100%;
    aspect-ratio: 9/16;
    object-fit: cover;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid #f1f5f9;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.post-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.post-image:hover::before {
    opacity: 1;
}

.post-image:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 16px 45px rgba(0,0,0,0.25);
    border-color: #667eea;
}

.error {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    color: #c53030;
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    text-align: center;
    border: 1px solid #fbb6ce;
}

.empty {
    text-align: center;
    padding: 60px 40px;
    color: #718096;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.empty p {
    font-size: 16px;
    margin-bottom: 10px;
}

.stats {
    background: white;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    text-align: center;
    color: #4a5568;
    font-size: 14px;
    border: 1px solid #f1f5f9;
}

.stats strong {
    color: #2d3748;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .results {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-group {
        min-width: auto;
    }
    
    .platform-tabs {
        flex-wrap: wrap;
    }
    
    .container {
        padding: 10px;
    }
    
    .search-form {
        padding: 20px;
    }
}

@media (max-width: 900px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .post-image {
        aspect-ratio: 9/16;
        border-radius: 12px;
    }

    .blogger-info {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .score {
        margin-left: 0;
        align-self: center;
    }

    .search-type-tab, .platform-tab {
        padding: 6px 12px;
        font-size: 12px;
        gap: 4px;
    }

    .search-type-tabs, .platform-tabs {
        gap: 6px;
    }

    .blogger-card {
        padding: 18px;
    }

    /* 下拉框移动端样式 */
    .dropdown-content {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90vw;
        max-width: 400px;
        max-height: 70vh;
        border-radius: 16px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    }

    .dropdown-options {
        max-height: 50vh;
    }

    .dropdown-option {
        padding: 12px 16px;
        font-size: 16px;
    }

    .dropdown-actions {
        padding: 12px 16px;
    }

    .dropdown-actions button {
        padding: 8px 16px;
        font-size: 14px;
        flex: 1;
    }
}
