/* Global Styles */
:root {
    --primary-color: #0366d6;
    --secondary-color: #586069;
    --background-color: #f6f8fa;
    --border-color: #e1e4e8;
    --header-bg: #24292e;
    --text-color: #24292e;
    --light-text: #6a737d;
    --hover-color: #f1f8ff;
    --success-color: #2ea44f;
    --error-color: #cb2431;
    --hashtag-color: #0366d6;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
    background-color: #fff;
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
}

button, .btn {
    display: inline-block;
    padding: 5px 16px;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    white-space: nowrap;
    border: 1px solid;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    user-select: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: #0259b7;
    border-color: #0259b7;
    text-decoration: none;
}

.btn-secondary {
    background-color: #fafbfc;
    border-color: var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #f3f4f6;
    border-color: var(--secondary-color);
    text-decoration: none;
}

.btn-danger {
    background-color: var(--error-color);
    border-color: var(--error-color);
    color: #fff;
}

.btn-danger:hover {
    background-color: #b21e2b;
    border-color: #b21e2b;
    text-decoration: none;
}

/* Form Styles */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-control {
    display: block;
    width: 100%;
    padding: 5px 12px;
    font-size: 14px;
    line-height: 20px;
    color: var(--text-color);
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
    transition: border-color 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.3);
}

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

.error-message {
    margin: 10px 0;
    padding: 10px;
    background-color: #ffeef0;
    border: 1px solid #ffc0c0;
    border-radius: 6px;
    color: var(--error-color);
}

.success-message {
    margin: 10px 0;
    padding: 10px;
    background-color: #e6ffed;
    border: 1px solid #b4e6b4;
    border-radius: 6px;
    color: var(--success-color);
}

/* Header Styles */
.main-header {
    background-color: var(--header-bg);
    color: #fff;
    padding: 16px 0;
    border-bottom: 1px solid #000;
}

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

.logo a {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.logo a i {
    margin-right: 8px;
}

.logo a:hover {
    text-decoration: none;
}

.main-nav ul {
    display: flex;
}

.main-nav ul li {
    margin-left: 16px;
    position: relative;
}

.main-nav ul li a {
    color: #fff;
    padding: 6px 0;
    display: inline-block;
}

.main-nav ul li a:hover {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
}

.dropdown-toggle i {
    margin-left: 6px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 180px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(149, 157, 165, 0.2);
    display: none;
    z-index: 100;
}

.dropdown.active .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0 !important;
}

.dropdown-menu li a {
    color: var(--text-color) !important;
    padding: 8px 16px !important;
    display: block;
    width: 100%;
}

.dropdown-menu li a:hover {
    background-color: var(--hover-color);
    color: var(--primary-color) !important;
}

.search-form {
    position: relative;
    width: 300px;
}

.search-form input[type="text"] {
    width: 100%;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 20px;
    background-color: rgba(255, 255, 255, 0.125);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    outline: none;
    transition: background-color 0.2s ease;
}

.search-form input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-form input[type="text"]:focus {
    background-color: #fff;
    color: var(--text-color);
}

.search-form button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

.search-form input[type="text"]:focus + button {
    color: var(--text-color);
}

/* Main Content Styles */
main.container {
    padding-top: 24px;
    padding-bottom: 48px;
    min-height: calc(100vh - 320px);
}

/* Login and Register Form Styles */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
}

.auth-card {
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(149, 157, 165, 0.2);
    padding: 32px;
    width: 100%;
    max-width: 480px;
}

.auth-card h2 {
    margin-bottom: 16px;
    font-size: 24px;
}

.auth-card p {
    margin-bottom: 24px;
    color: var(--light-text);
}

.auth-card .btn {
    width: 100%;
    padding: 8px 16px;
}

.is-invalid {
    border-color: var(--error-color) !important;
}

/* Card Styles */
.card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 16px;
    overflow: hidden;
}

.card-header {
    background-color: var(--background-color);
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.card-body {
    padding: 16px;
}

.card-footer {
    background-color: var(--background-color);
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

/* Code Snippet Styles */
.code-item {
    margin-bottom: 24px;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.code-title {
    font-size: 16px;
    font-weight: 600;
}

.code-meta {
    display: flex;
    align-items: center;
    color: var(--light-text);
    font-size: 12px;
}

.code-meta a {
    display: flex;
    align-items: center;
    margin-right: 12px;
}

.code-meta a i {
    margin-right: 4px;
}

.code-content {
    position: relative;
    border: 1px solid var(--border-color);
    border-top: none;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.code-content pre {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
    background-color: #fff;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 12px;
    line-height: 1.5;
}

.code-content code {
    background: none;
    padding: 0;
    margin: 0;
}

.code-language {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 12px;
    color: var(--light-text);
    background-color: rgba(255, 255, 255, 0.7);
    padding: 2px 6px;
    border-radius: 3px;
}

.code-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-top: none;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.action-buttons a {
    margin-right: 12px;
    color: var(--secondary-color);
    display: inline-flex;
    align-items: center;
}

.action-buttons a i {
    margin-right: 4px;
}

.action-buttons a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* User Profile Styles */
.profile-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 24px;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 24px;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.profile-username {
    font-size: 20px;
    color: var(--light-text);
    margin-bottom: 16px;
}

.profile-bio {
    margin-bottom: 16px;
    line-height: 1.6;
}

.profile-stats {
    display: flex;
    margin-bottom: 16px;
}

.stat-item {
    margin-right: 16px;
    display: flex;
    align-items: center;
}

.stat-item i {
    margin-right: 4px;
    color: var(--secondary-color);
}

.profile-tabs {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.profile-tabs ul {
    display: flex;
}

.profile-tabs li {
    margin-right: 16px;
}

.profile-tabs a {
    display: block;
    padding: 12px 16px;
    font-weight: 600;
    color: var(--light-text);
    border-bottom: 2px solid transparent;
}

.profile-tabs a:hover {
    color: var(--text-color);
    text-decoration: none;
}

.profile-tabs a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Comment Styles */
.comments-section {
    margin-top: 24px;
}

.comment {
    display: flex;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 16px;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    margin-right: 8px;
}

.comment-date {
    color: var(--light-text);
    font-size: 12px;
}

.comment-text {
    line-height: 1.6;
}

.comment-actions {
    margin-top: 8px;
}

.comment-actions a {
    margin-right: 16px;
    font-size: 12px;
    color: var(--light-text);
}

/* Hero Section Styles */
.hero-section {
    background-color: var(--background-color);
    padding: 60px 0;
    margin-bottom: 40px;
    text-align: center;
    border-radius: 6px;
}

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

.hero-content h1 {
    font-size: 36px;
    margin-bottom: 16px;
    color: var(--text-color);
}

.hero-content p {
    font-size: 18px;
    color: var(--light-text);
    margin-bottom: 24px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.hero-buttons .btn {
    padding: 8px 24px;
    font-size: 16px;
}

/* Footer Styles */
.main-footer {
    background-color: var(--header-bg);
    color: #fff;
    padding: 48px 0 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
    color: #fff;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
}

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

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 15px;
    display: block;
}

.footer-column ul li a:hover {
    color: #fff;
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    transition: all 0.3s ease;
    font-size: 16px;
}

.social-link:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.inactive-link {
    opacity: 0.5;
    cursor: not-allowed;
}

.inactive-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom p {
    margin: 5px 0;
    font-size: 14px;
}

/* Archive notice styling for company pages */
.archive-notice {
    margin-bottom: 30px;
}

.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.15);
    border-left: 4px solid #ffc107;
    color: #856404;
}

.alert-info {
    background-color: rgba(23, 162, 184, 0.15);
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

.alert h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

/* Page content common styles */
.page-content {
    padding: 40px 0;
    min-height: 60vh;
}

.page-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.page-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

/* Responsive Footer */
@media (max-width: 991px) {
    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-column h3:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-column ul li a:hover {
        transform: none;
    }
}

/* Hashtag Styles */
.hashtag {
    color: var(--hashtag-color);
    font-weight: 600;
    transition: color 0.2s ease;
}

.hashtag:hover {
    text-decoration: underline;
    cursor: pointer;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .main-header .container {
        flex-wrap: wrap;
    }
    
    .search-form {
        order: 3;
        width: 100%;
        margin-top: 16px;
    }
    
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-image {
        margin-right: 0;
        margin-bottom: 16px;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .main-nav {
        order: 2;
    }
    
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-column h3:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-column ul li a:hover {
        transform: none;
    }
    
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .code-grid {
        grid-template-columns: 1fr;
    }
} 