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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
}

/* Header styles */
.navbar {
    background-color: #333;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: #fff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.search-bar {
    display: flex;
    gap: 0.5rem;
}

.search-bar input {
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    width: 300px;
}

.search-bar button {
    padding: 0.5rem 1rem;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
}

/* Banner styles */
.banner {
    background: linear-gradient(135deg, #007bff, #0056b3);
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.banner h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.banner p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Categories grid */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    padding: 2rem;
}

.category-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.category-card:hover {
    transform: translateY(-5px);
}

.code-meta {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    color: #666;
}

/* Category page styles */
.category-header {
    background-color: #007bff;
    color: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
}

.filters {
    padding: 1rem;
    background-color: #fff;
    margin-bottom: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sort-options {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.sort-options a {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
}

.sort-options a.active {
    background-color: #007bff;
    color: #fff;
}

.codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

/* Profile page styles */
.profile-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.profile-section {
    background-color: #fff;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.profile-form {
    max-width: 500px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.user-codes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.code-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-danger {
    background-color: #dc3545;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Code editor styles */
.code-editor {
    font-family: monospace;
    min-height: 300px;
    width: 100%;
    padding: 1rem;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Code form styles */
.code-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

/* Comment styles */
.comment-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.comment {
    background-color: #fff;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: #666;
}

.comment-content {
    white-space: pre-wrap;
}

.main-footer {
    background-color: #333;
    color: #fff;
    padding: 3rem 0;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 0 1rem;
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #fff;
    text-decoration: none;
}

.footer-section a:hover {
    color: #007bff;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    font-size: 1.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Nút */
.btn-primary, .btn-secondary {
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Custom styles */
.hero {
    background: linear-gradient(135deg, #0d6efd, #0043a8);
}

.card {
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.social-links a {
    transition: opacity 0.2s;
}

.social-links a:hover {
    opacity: 0.8;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.content-wrapper {
    min-height: calc(100vh - 56px - 300px);
} 