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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #ecf0f1;
}

.auth-container form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-container input {
    width: 100%;
    padding: 0.75rem;
    margin: 0.5rem 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.auth-container button {
    width: 100%;
    padding: 0.75rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.auth-container button:hover {
    background-color: #2980b9;
}

nav {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#user-info {
    font-size: 0.9rem;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    width: 100%;
}

.hidden {
    display: none !important;
}

#loading, #error {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
}

#error {
    color: #e74c3c;
    background-color: #fadbd8;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.category {
    margin-bottom: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.category-header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 1.5rem;
    font-size: 1.5rem;
}

.website-list {
    padding: 1.5rem;
}

.website-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.website-item:last-child {
    border-bottom: none;
}

.website-link {
    text-decoration: none;
    color: #2980b9;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.website-link:hover {
    color: #e74c3c;
}

.website-url {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 管理面板样式 */
.panel {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 2rem;
    margin-top: 2rem;
}

.admin-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.control-group {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1rem;
}

.control-group h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.admin-controls input, .admin-controls select, .admin-controls button {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.admin-controls button {
    background-color: #2ecc71;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

.admin-controls button:hover {
    background-color: #27ae60;
}

.category-item, .website-item-admin, .user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.category-item:last-child, .website-item-admin:last-child, .user-item:last-child {
    border-bottom: none;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.delete-btn:hover {
    background-color: #c0392b;
}

.role-selector {
    margin-left: 0.5rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #ccc;
}