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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

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

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo:hover {
    color: white;
    opacity: 0.9;
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    border-radius: 5px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-welcome {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* User Status Indicator */
.user-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.user-status.online {
    background: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.user-status.offline {
    background: #6c757d;
}

.user-status.recent {
    background: #ffc107;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

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

.alert-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.alert-close:hover {
    opacity: 1;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-weight: 500;
    text-align: center;
    justify-content: center;
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    color: white;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-copy {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-copy:hover {
    background: #5a6268;
}

.btn-copy.copied {
    background: #28a745;
}

.btn-icon {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 3px;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: #f0f0f0;
    color: #333;
}

/* Forms */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

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

.auth-box h1 {
    margin-bottom: 0.5rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.subtitle {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.auth-form {
    margin-top: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-text {
    display: block;
    margin-top: 0.3rem;
    color: #666;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.form-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 1rem;
    margin: 1rem 0;
}

.form-info.warning {
    background: #fff3cd;
    border-color: #ffc107;
}

.form-info h4 {
    margin-bottom: 0.5rem;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.auth-links {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    text-align: center;
}

.auth-links p {
    margin-bottom: 0.5rem;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.small-text {
    font-size: 0.9rem;
    color: #666;
}

.small-text.warning {
    color: #dc3545;
}

/* Dashboard */
.dashboard-container {
    padding: 2rem 0;
}

.main-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

@media (max-width: 992px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.user-card {
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
}

.user-avatar {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.user-info h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.user-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.side-nav a {
    padding: 0.8rem 1rem;
    text-decoration: none;
    color: #555;
    border-radius: 5px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.side-nav a:hover {
    background: #f0f0f0;
}

.side-nav a.active {
    background: #667eea;
    color: white;
}

.sidebar-widget {
    margin-top: 1.5rem;
}

.sidebar-widget h4 {
    margin-bottom: 0.8rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.trending-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    text-decoration: none;
    color: #555;
    border-radius: 3px;
    transition: all 0.3s;
}

.trending-item:hover {
    background: #f0f0f0;
}

.trending-name {
    font-weight: 500;
}

.trending-count {
    background: #f0f0f0;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

.empty-text {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 0.5rem;
}

/* Main Content */
.main-content {
    min-width: 0; /* Para evitar overflow */
}

.create-post-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.create-post-card h3 {
    margin-bottom: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.form-select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

.form-textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    resize: vertical;
    font-family: inherit;
    min-height: 100px;
}

.char-counter {
    text-align: right;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.3rem;
}

/* Emoji Picker */
.emoji-picker {
    margin-top: 0.5rem;
}

.emoji-picker span {
    font-size: 0.9rem;
    color: #666;
    margin-right: 0.5rem;
}

.emoji-buttons {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.3rem;
    flex-wrap: wrap;
}

.emoji-btn {
    background: #f0f0f0;
    border: none;
    border-radius: 3px;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.emoji-btn:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

/* Posts Feed */
.posts-feed {
    margin-top: 1rem;
}

.posts-feed h2 {
    margin-bottom: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.post-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-avatar {
    color: #667eea;
}

.author-name {
    font-weight: 600;
    color: #333;
}

.post-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.post-topic {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.post-topic:hover {
    text-decoration: underline;
}

.post-time {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.post-content mark {
    background: #fff3cd;
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
}

.post-stats {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
}

.post-stat {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.post-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.like-form {
    display: inline;
}

.btn-action {
    background: none;
    border: 1px solid #ddd;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.btn-action:hover {
    background: #f8f9fa;
    border-color: #667eea;
    color: #667eea;
}

.btn-like:hover {
    background: #e7f3ff;
    border-color: #007bff;
    color: #007bff;
}

.btn-comment:hover {
    background: #f0f9ff;
    border-color: #17a2b8;
    color: #17a2b8;
}

.btn-report:hover {
    background: #ffeaea;
    border-color: #dc3545;
    color: #dc3545;
}

.reported-badge {
    background: #d4edda;
    color: #155724;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.post-removed {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 2rem;
    border-radius: 5px;
    text-align: center;
}

.post-removed h4 {
    margin: 1rem 0 0.5rem 0;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.page-link {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-link:hover {
    background: #f8f9fa;
}

.page-link.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.report-form {
    width: 100%;
}

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

/* Key Code Display */
.keycode-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.keycode-box {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 600px;
}

.keycode-box h1 {
    margin-bottom: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.warning-box {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.warning-icon {
    font-size: 2rem;
    color: #ffc107;
}

.warning-content h3 {
    margin-bottom: 0.5rem;
    color: #856404;
}

.key-code-display {
    background: #f8f9fa;
    border: 2px dashed #dc3545;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.key-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #333;
}

.key-code-value {
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-all;
    color: #333;
    padding: 1rem;
    background: white;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.keycode-actions {
    margin: 1.5rem 0;
}

.keycode-actions h3 {
    margin-bottom: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suggestions {
    list-style: none;
    padding-left: 0;
}

.suggestions li {
    padding: 0.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.suggestions li i {
    margin-top: 0.2rem;
}

.suggestions li i.fa-check-circle {
    color: #28a745;
}

.suggestions li i.fa-times-circle {
    color: #dc3545;
}

.keycode-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.keycode-buttons .btn {
    flex: 1;
    min-width: 150px;
}

/* Home Page */
.hero {
    padding: 4rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.hero .subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: #666;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: #333;
}

.cta {
    margin: 3rem 0;
}

.security-note {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-top: 3rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.security-note h3 {
    margin-bottom: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.security-features {
    max-width: 600px;
    margin: 0 auto;
}

.security-features p {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

/* Topics Page */
.topics-container {
    padding: 2rem 0;
}

.topics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.topics-header h1 {
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.topic-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.topic-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.topic-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.topic-card-header h3 {
    margin: 0;
}

.topic-card-header h3 a {
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.topic-card-header h3 a:hover {
    color: #667eea;
}

.topic-count {
    background: #f0f0f0;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.topic-description {
    color: #666;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.topic-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.topic-creator {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Topic Detail */
.topic-container {
    padding: 2rem 0;
}

.topic-header {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.topic-info h1 {
    margin-bottom: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topic-description {
    color: #666;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.topic-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.topic-stats .stat {
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topic-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Search Page */
.search-container {
    padding: 2rem 0;
}

.search-header {
    text-align: center;
    margin-bottom: 2rem;
}

.search-header h1 {
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

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

.search-form {
    width: 100%;
}

.search-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
}

.search-select {
    width: auto;
    min-width: 120px;
}

.search-btn {
    white-space: nowrap;
}

.search-tips {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-results {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-header h2 {
    margin: 0;
    color: #333;
}

.results-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.count-badge {
    background: #667eea;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.search-intro {
    text-align: center;
    padding: 3rem 0;
}

.intro-card {
    background: white;
    border-radius: 10px;
    padding: 3rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    max-width: 600px;
    margin: 0 auto;
}

.intro-card i {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.intro-card h3 {
    margin-bottom: 1rem;
    color: #333;
}

.search-tips-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    text-align: left;
}

.search-tips-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-tips-list li i {
    font-size: 1rem;
    color: #28a745;
}

.popular-searches {
    margin-top: 2rem;
}

.popular-searches h4 {
    margin-bottom: 1rem;
    color: #333;
}

.tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tag {
    background: #f0f0f0;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s;
}

.tag:hover {
    background: #667eea;
    color: white;
}

.search-suggestions {
    margin-top: 2rem;
    text-align: left;
}

.search-suggestions ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

.search-suggestions li {
    padding: 0.3rem 0;
}

/* Profile Page */
.profile-container {
    padding: 2rem 0;
}

.profile-header {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.profile-avatar {
    font-size: 4rem;
    color: #667eea;
}

.profile-info h1 {
    margin-bottom: 0.5rem;
    color: #333;
}

.profile-meta {
    color: #666;
}

.profile-meta p {
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stats-section {
    margin: 2rem 0;
}

.stats-section h2 {
    margin-bottom: 1.5rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 2rem;
    color: #667eea;
    background: #f0f0f0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-info h3 {
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 1rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
}

.edit-profile-section {
    margin: 2rem 0;
}

.edit-profile-section h2 {
    margin-bottom: 1.5rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.edit-form-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.keycode-preview {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 0.8rem;
    margin-top: 0.5rem;
}

.keycode-preview code {
    font-family: monospace;
    color: #333;
}

.security-section {
    margin: 2rem 0;
}

.security-section h2 {
    margin-bottom: 1.5rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.security-info {
    margin-bottom: 2rem;
}

.security-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

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

.security-icon {
    font-size: 1.5rem;
    color: #667eea;
    min-width: 40px;
}

.security-icon.warning {
    color: #ffc107;
}

.security-content h3 {
    margin-bottom: 0.3rem;
    color: #333;
}

.security-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.recent-posts-section {
    margin: 2rem 0;
}

.recent-posts-section h2 {
    margin-bottom: 1.5rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Post Detail */
.post-detail-container {
    padding: 2rem 0;
}

.post-detail-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.comment-form-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.comment-form-card h3 {
    margin-bottom: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comments-section {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.comments-section h3 {
    margin-bottom: 1.5rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-card {
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 5px;
    background: #fafafa;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.comment-time {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.comment-content {
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: #666;
}

.empty-state p {
    color: #999;
}

/* Footer */
footer {
    background: #333;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section p {
    color: #aaa;
    line-height: 1.6;
}

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

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

.footer-section a {
    color: #aaa;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.footer-section a:hover {
    color: white;
    padding-left: 5px;
}

.footer-section li i {
    color: #667eea;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
    color: #aaa;
}

.footer-note {
    margin-top: 1rem;
    color: #ffc107;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .user-welcome {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    .topics-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .topics-header h1 {
        text-align: center;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .search-input,
    .search-select,
    .search-btn {
        width: 100%;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .security-actions {
        flex-direction: column;
    }
    
    .security-actions .btn {
        width: 100%;
    }
    
    .keycode-buttons {
        flex-direction: column;
    }
    
    .keycode-buttons .btn {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    header, footer, .post-actions, .comment-form-card {
        display: none;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .post-card, .post-detail-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
