/* Reset and base styles */
* {
    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: #f5f5f5;
}

/* Navigation styles */
.nav-bar {
    background: linear-gradient(135deg, #ff5722, #f44336);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-left img {
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.nav-left img:hover {
    transform: scale(1.1);
}

.nav-menu li {
    transition: all 0.3s ease;
}

.nav-menu li:hover {
    transform: translateY(-2px);
}

.nav-menu li a:hover {
    background-color: rgba(255,255,255,0.2);
    border-radius: 5px;
}

/* Container and layout */
.container {
    animation: fadeIn 0.6s ease-out;
}

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

/* Post styles */
.post-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #ff5722;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.post-title {
    color: #ff5722;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.3em;
    transition: color 0.3s ease;
}

.post-title:hover {
    color: #d84315;
    text-decoration: underline;
}

.post-meta {
    color: #666;
    font-size: 0.9em;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.post-content {
    margin: 15px 0;
    line-height: 1.7;
    color: #444;
}

/* Button styles */
.btn-primary {
    background: linear-gradient(135deg, #ff5722, #f44336);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,87,34,0.3);
}

.btn-secondary {
    background: #666;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: #555;
    transform: translateY(-1px);
}

/* Form styles */
.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #ff5722;
    box-shadow: 0 0 0 3px rgba(255,87,34,0.1);
}

/* Upvote button styles */
.upvote-btn {
    background: none;
    border: none;
    color: #ff5722;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 15px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.upvote-btn:hover:not(.upvoted) {
    background-color: rgba(255,87,34,0.1);
    transform: scale(1.1);
}

.upvoted {
    opacity: 0.6;
    cursor: default !important;
    background-color: rgba(255,87,34,0.2);
}

/* Comment styles */
.comment {
    border-left: 4px solid #ff5722;
    padding-left: 15px;
    margin: 15px 0;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.comment:hover {
    background: #f5f5f5;
    transform: translateX(5px);
}

.comment-meta {
    color: #666;
    font-size: 0.85em;
    margin-bottom: 8px;
}

.comment-text {
    color: #444;
    line-height: 1.6;
}

/* Category badges */
.category-badge {
    background: linear-gradient(135deg, #ff5722, #f44336);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 600;
}

/* Modal improvements */
.modal-content {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.close {
    transition: all 0.3s ease;
}

.close:hover {
    transform: scale(1.2);
    color: #ff5722;
}

/* Language switcher */
.lang-switcher {
    transition: all 0.3s ease;
    font-weight: 600;
}

.lang-switcher:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Responsive design */
@media (max-width: 768px) {
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .nav-bar {
        padding: 15px;
    }
    
    .nav-menu {
        margin-top: 15px;
    }
    
    .container {
        padding: 5px;
    }
}

/* Error message styles */
.error-message {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    border: 1px solid #f44336;
    color: #c62828;
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    animation: slideIn 0.3s ease-out;
}

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

/* Loading animation */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Hover effects for interactive elements */
a, button {
    transition: all 0.3s ease;
}

/* Focus styles for accessibility */
button:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid #ff5722;
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}