:root {
    --bg-color: #fafafa;
    --card-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --accent: #000000;
    --accent-hover: #374151;
    --border-color: #eaeaea;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 10px 40px -10px rgba(0, 0, 0, 0.06);
    --transition: all 0.25s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

.main-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 20px;
}

.hero-section {
    text-align: center;
    padding: 60px 20px 50px;
    max-width: 800px;
    margin: 0 auto;
}

.page-title {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
    letter-spacing: -0.03em;
}

.subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    font-weight: 400;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px 60px;
    flex: 1;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    letter-spacing: 0.01em;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

/* Grid Layout */
.site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

/* Site Card */
.site-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    padding: 18px 20px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
}

.site-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: #d1d5db;
}

.site-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%; /* Circle icon for modern feel */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-right: 16px;
    flex-shrink: 0;
}

.site-info {
    flex: 1;
    overflow: hidden;
}

.site-name {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Search Box */
.search-container {
    margin-top: 30px;
    max-width: 600px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.search-box svg {
    color: #9ca3af;
    margin-right: 10px;
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 0.95rem;
    color: var(--text-main);
    outline: none;
}

.search-box input::placeholder {
    color: #9ca3af;
}

.notice-box {
    margin-top: 60px;
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Admin Styles */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.admin-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
}

.btn {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 8px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn:hover {
    background-color: var(--accent-hover);
}

.btn-secondary {
    background-color: #ffffff;
    color: var(--text-main);
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background-color: #f3f4f6;
    color: var(--text-main);
}

.btn-danger {
    background-color: #ffffff;
    color: #ef4444;
    border: 1px solid #fee2e2;
}

.btn-danger:hover {
    background-color: #fef2f2;
    border-color: #fca5a5;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: var(--transition);
    font-family: inherit;
    background: #ffffff;
    color: var(--text-main);
}

.form-control:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 1px #000;
}

.panel {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.panel h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

th {
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    margin-top: auto;
    color: var(--text-muted);
    font-size: 0.85rem;
}

footer a {
    color: var(--text-muted);
    text-decoration: none;
}

footer a:hover {
    color: var(--text-main);
}
