:root {
    --primary-color: #1877f2;
    --secondary-color: #42b72a;
    --background-color: #f0f2f5;
    --card-color: #ffffff;
    --text-color: #050505;
    --text-secondary: #65676b;
    --danger-color: #ff4d4f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.header {
    background-color: var(--card-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    color: var(--primary-color);
    font-size: 28px;
    font-weight: 700;
}

.nav {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

.nav a:hover {
    color: var(--primary-color);
}

.auth-form {
    max-width: 500px;
    margin: 50px auto;
    background-color: var(--card-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.auth-form h2 {
    margin-bottom: 20px;
    text-align: center;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #166fe5;
}

.btn-small {
    padding: 5px 10px;
    font-size: 14px;
}

.btn-danger {
    background-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #ff3333;
}

.alert {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert.error {
    background-color: #ffe3e3;
    color: #ff0000;
}

.alert.success {
    background-color: #e3ffe3;
    color: #00aa00;
}

.feed {
    margin: 20px 0;
}

.create-post {
    background-color: var(--card-color);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.create-post textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 10px;
    font-size: 16px;
}

.post {
    background-color: var(--card-color);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.post-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 14px;
}

.post-content {
    margin-bottom: 15px;
    line-height: 1.5;
}

.post-actions {
    display: flex;
    gap: 15px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.like-btn, .comment-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.like-btn.liked {
    color: var(--primary-color);
}

.comments-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.comment {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f0f2f5;
    border-radius: 8px;
}

.comment-author {
    font-weight: 500;
    color: var(--primary-color);
}

.comment-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.comment-form input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
}

/* Profil użytkownika */
.profile-container {
    margin: 20px 0;
}

.profile-header {
    background-color: var(--card-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.profile-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .profile-content {
        grid-template-columns: 300px 1fr;
    }
}

.profile-info {
    background-color: var(--card-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.user-posts {
    background-color: var(--card-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.user-posts h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.no-posts {
    color: var(--text-secondary);
    font-style: italic;
}

/* Panel administratora */
.admin-panel {
    margin: 20px 0;
}

.admin-panel h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.admin-section {
    background-color: var(--card-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.admin-section h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.admin-table th,
.admin-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background-color: #f0f2f5;
    font-weight: 500;
}

.post-content-preview {
    max-width: 200px;
    white-space: nowrap;
	overflow: hidden;
    text-overflow: ellipsis;
}

.current-user {
    color: var(--text-secondary);
    font-style: italic;
}

/* Responsywność */
@media (max-width: 768px) {
    .admin-table {
        display: block;
        overflow-x: auto;
    }
    
    .header .container {
        flex-direction: column;
    }
    
    .nav {
        flex-wrap: wrap;
    }
}

/* Panel statystyk */
.stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background-color: var(--card-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Powiadomienia */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--card-color);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-in-out;
    z-index: 1000;
    max-width: 350px;
}

.notification-success {
    border-left: 4px solid var(--secondary-color);
}

.notification-error {
    border-left: 4px solid var(--danger-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 40px;
    border-top: 1px solid #eee;
}

/* Style dla podglądu linków */
.link-preview {
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.link-preview:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.link-preview a {
    display: flex;
    text-decoration: none;
    color: inherit;
}

.link-preview-image {
    flex: 0 0 150px;
    height: 150px;
    background-color: #f0f2f5;
    position: relative;
    overflow: hidden;
}

.link-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.link-preview-content {
    flex: 1;
    padding: 15px;
}

.link-preview-title {
    margin: 0 0 8px;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
}

.link-preview-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0 0 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.link-preview-url {
    color: var(--primary-color);
    font-size: 12px;
    display: block;
}

/* Responsywność dla podglądu linków */
@media (max-width: 576px) {
    .link-preview a {
        flex-direction: column;
    }
    
    .link-preview-image {
        flex: auto;
        height: 180px;
        width: 100%;
    }
}
/* Dodanie stylów dla podglądu linków */
.link-preview {
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f9f9f9;
}

.link-preview-container {
    display: flex;
    text-decoration: none;
    color: inherit;
}

.link-preview-image {
    flex: 0 0 150px;
    height: 150px;
    overflow: hidden;
}

.link-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.link-preview-content {
    flex: 1;
    padding: 12px;
}

.link-preview-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
}

.link-preview-description {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.link-preview-url {
    font-size: 12px;
    color: #999;
}

@media (max-width: 600px) {
    .link-preview-container {
        flex-direction: column;
    }
    
    .link-preview-image {
        flex: 0 0 auto;
        height: 200px;
        width: 100%;
    }
}
/* Dodanie stylów dla obrazków w postach */
.image-upload-container {
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.image-upload-label {
    display: inline-block;
    padding: 8px 12px;
    background-color: #f0f2f5;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background-color 0.2s;
}

.image-upload-label:hover {
    background-color: #e4e6e9;
}

.image-upload-input {
    display: none;
}

.image-preview {
    max-width: 100%;
    margin-top: 10px;
    display: none;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.post-image {
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
    max-height: 500px;
    text-align: center;
}

.post-image img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
}
.post-image img {
    border-radius: 10px; /* Zaokrąglenie wszystkich rogów */
    overflow: hidden;
}

