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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

header h1 { font-size: 24px; }

nav { display: flex; gap: 10px; }

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.3s;
}

nav a:hover, nav a.active { background: rgba(255,255,255,0.2); }

.user-info { display: flex; align-items: center; gap: 10px; }

.user-info .username { margin-right: 10px; }

.btn-logout {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}

/* Hero */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.hero h2 { font-size: 32px; color: #333; margin-bottom: 10px; }
.hero p { font-size: 18px; color: #666; margin-bottom: 30px; }

.hero-btns { display: flex; gap: 15px; justify-content: center; }

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary { background: #667eea; color: white; }
.btn-primary:hover { background: #5568d3; }

.btn-secondary { background: #f5f7fa; color: #333; border: 1px solid #ddd; }
.btn-secondary:hover { background: #e8ebf0; }

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-num { font-size: 36px; font-weight: bold; color: #667eea; }
.stat-label { font-size: 14px; color: #666; margin-top: 5px; }

/* Features */
.features { margin: 40px 0; }
.features h3 { text-align: center; margin-bottom: 30px; font-size: 24px; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.feature-card h4 { font-size: 18px; margin-bottom: 10px; color: #333; }
.feature-card p { color: #666; }

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 60px;
}

/* Page styles */
.page { display: none; }
.page.active { display: block; }

.page-header {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.search-box { display: flex; gap: 10px; margin: 20px 0; }

.search-box input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.search-box button {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.card:hover { transform: translateY(-5px); }
.card h3 { font-size: 18px; margin-bottom: 10px; }
.card .meta { font-size: 12px; color: #999; margin-bottom: 10px; }
.card p { color: #666; font-size: 14px; margin-bottom: 15px; }

.card .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 15px; }

.tag {
    background: #f5f7fa;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.card .actions { display: flex; gap: 10px; }

.card .btn-detail {
    flex: 1;
    padding: 10px;
    background: #667eea;
    color: white;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
}

.card .btn-detail:hover { background: #5568d3; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; }

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.form-group textarea { min-height: 100px; resize: vertical; }

.form-actions { display: flex; gap: 10px; }

.form-actions button {
    padding: 12px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.form-actions button:hover { background: #5568d3; }

/* Login */
.login-container {
    max-width: 400px;
    margin: 60px auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.login-container h2 { text-align: center; margin-bottom: 30px; }
.login-container .btn { width: 100%; text-align: center; margin-top: 20px; }

/* Empty/Loading */
.empty-state { text-align: center; padding: 60px 20px; color: #999; }
.loading { text-align: center; padding: 40px; color: #999; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 10px; margin: 30px 0; }
.pagination button { padding: 8px 16px; background: white; border: 1px solid #ddd; border-radius: 6px; cursor: pointer; }
.pagination button.active { background: #667eea; color: white; border-color: #667eea; }

/* Toast */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #333;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}
.toast.success { background: #4caf50; }
.toast.error { background: #f44336; }

@keyframes slideIn {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}