/* Reset some default browser styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Navbar styles */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e0e0e0;
    background-color: #fff;
}

.logo {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}

.navbar-right {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: border-bottom-color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    border-bottom-color: #1890ff;
    color: #1890ff;
}

/* Main content styles */
.main-content {
    min-height: calc(100vh - 60px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
}

/* Search container styles */
.search-container {
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.search-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.search-container h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.search-container p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
}

#search-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

#search-input {
    padding: 0.8rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.search-btn, .submit-btn, .update-btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    max-width: 200px;
    margin: 0 auto;
}

.search-btn, .submit-btn {
    background-color: #1890ff;
    color: #fff;
}

.search-btn:hover, .submit-btn:hover {
    background-color: #40a9ff;
}

.update-btn {
    background-color: #fff;
    color: #1890ff;
    border: 1px solid #1890ff;
}

.update-btn:hover {
    background-color: #e6f7ff;
}

.stats {
    font-size: 0.9rem;
    color: #1890ff;
    margin-bottom: 1rem;
}

.bot-info {
    font-size: 0.8rem;
    color: #999;
}

/* Search results styles */
.results-container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

#search-results {
    width: 100%;
    margin: 0 auto;
}

.results-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 0 auto 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
    width: 100%;
    max-width: 800px;
}

#search-form {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 0;
}

#search-input {
    padding: 0.8rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
    max-width: 500px;
}

.results-count {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin: 0;
}

.data-warning {
    font-size: 0.9rem;
    color: #ff4d4f;
    text-align: center;
    padding: 0 1rem;
    margin: 0;
}

.no-results {
    text-align: center;
    padding: 3rem 0;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ff4d4f;
}

.no-results h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.no-results p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.add-user-link {
    color: #1890ff;
    text-decoration: none;
}

.add-user-link:hover {
    text-decoration: underline;
}

/* User card styles */
.user-card {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin: 0 auto 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    max-width: 800px;
}

.user-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.user-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin-right: 1rem;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar img {
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.2rem;
    word-break: break-word;
}

.user-description {
    font-size: 0.9rem;
    color: #666;
    text-align: left;
    margin: 0.2rem 0 0.5rem;
    padding: 0;
    line-height: 1.4;
    word-break: break-word;
}

.user-role {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 0.5rem;
}

.user-gender-0 {
    color: #ff69b4;
    margin-left: 0.3rem;
}

.user-gender-1 {
    color: #4169e1;
    margin-left: 0.3rem;
}

.user-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 0.8rem;
    color: #666;
    margin: 0;
    padding: 0;
}

.user-stats span {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    white-space: nowrap;
}

.refresh-btn {
    background: none;
    border: none;
    color: #1890ff;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.refresh-btn:hover {
    text-decoration: underline;
}

/* Responsive styles */
@media (max-width: 768px) {
    /* Header responsive */
    header {
        padding: 0.5rem 1rem;
    }
    
    nav ul {
        gap: 0.5rem;
    }
    
    nav ul li a {
        padding: 0.5rem 0.8rem;
    }
    
    /* Search results responsive */
    .results-header {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    #search-input {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }
    
    /* User card responsive */
    .user-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1rem;
        max-width: 100%;
    }
    
    .user-avatar {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .user-info {
        width: 100%;
    }
    
    .user-description {
        text-align: center;
        margin: 0.5rem 0;
    }
    
    .user-stats {
        justify-content: center;
    }
    
    /* Adjust padding and margins */
    main {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    /* Mobile-specific styles */
    .user-stats {
        gap: 0.6rem;
    }
    
    .user-stats span {
        font-size: 0.75rem;
    }
    
    .results-header {
        gap: 0.8rem;
    }
    
    .data-warning {
        font-size: 0.8rem;
    }
}

/* Submit page styles */
.submit-container {
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.submit-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #1890ff;
}

.submit-container h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #333;
}

#submit-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

#submit-input {
    padding: 0.8rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.submit-info {
    font-size: 0.8rem;
    color: #999;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

/* Responsive design */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .navbar-right {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    .search-container h1 {
        font-size: 1.5rem;
    }

    .main-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .navbar-right {
        flex-wrap: wrap;
        justify-content: center;
    }

    .search-container h1 {
        font-size: 1.3rem;
    }

    #search-input, #submit-input {
        padding: 0.6rem 0.8rem;
    }

    .search-btn, .submit-btn, .update-btn {
        padding: 0.6rem 1.5rem;
    }
}