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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #1a202c;
}
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}
.site-header, .admin-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #1a202c;
    padding: 24px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.site-header .container,
.admin-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-header h1, .admin-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-header p {
    margin: 6px 0 0 0;
    color: #718096;
    font-size: 14px;
    font-weight: 400;
}
.admin-header nav a {
    color: #4a5568;
    margin-left: 16px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.admin-header nav a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 48px 0 64px;
}
.card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: row;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 140px;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.2);
}
.card-cover {
    position: relative;
    overflow: hidden;
    width: 210px;
    flex-shrink: 0;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.card:hover .card-cover img {
    transform: scale(1.05);
}
.card-body {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #1a202c;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-summary {
    font-size: 12px;
    color: #718096;
    margin: 0 0 10px;
    line-height: 1.4;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.2s ease;
    align-self: flex-start;
}

.card-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
.back-link {
    display: inline-flex;
    align-items: center;
    color: #4a5568;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.back-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}
.post-detail {
    padding: 48px 0 64px;
}

.post-cover img {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.post-meta {
    margin: 24px 0;
    font-size: 14px;
    color: #718096;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.post-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    line-height: 1.8;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    font-size: 16px;
}
.auth-container {
    max-width: 420px;
    margin: 80px auto 40px;
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}
.auth-container h1 {
    margin: 0 0 32px;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-container form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

input[type="text"],
input[type="password"],
input[type="file"],
textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    font-size: 15px;
    background: #f7fafc;
    transition: all 0.2s ease;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
button {
    margin-top: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.table th,
.table td {
    padding: 16px 20px;
    font-size: 14px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.table tr:hover td {
    background: #f7fafc;
}

.table td a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    margin-right: 12px;
    transition: color 0.2s ease;
}

.table td a:hover {
    color: #764ba2;
    text-decoration: underline;
}
.error {
    color: #c53030;
    font-size: 14px;
    background: #fed7d7;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-left: 4px solid #c53030;
}

.success {
    color: #2f855a;
    font-size: 14px;
    background: #c6f6d5;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-left: 4px solid #2f855a;
}
.post-form {
    margin-top: 24px;
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.cover-preview img {
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.25);
}

main h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    margin: 32px 0 16px;
}

@media (max-width: 768px) {
    .site-header .container,
    .admin-header .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 32px 0 48px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .post-detail {
        padding: 32px 0 48px;
    }
    
    .post-content {
        padding: 24px;
    }
    
    .auth-container {
        margin: 40px auto;
        padding: 32px 24px;
    }
    
    .post-form {
        padding: 24px;
    }
    
    .table th,
    .table td {
        padding: 12px;
        font-size: 13px;
    }
}
