/* Modern Minimalist Design - Polish Social Network */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Apple-inspired Color Palette */
    --primary: #0071e3;
    --primary-hover: #0077ed;
    --primary-light: #e8f3ff;
    --primary-dark: #005bb7;

    --secondary: #86868b;
    --accent: #515154;
    --success: #34c759;
    --warning: #ff9f0a;
    --error: #ff3b30;

    /* Neuralne kolory - Apple Gray Scale */
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --bg-tertiary: #fafafa;

    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-tertiary: #a1a1a6;

    --border: #d2d2d7;
    --border-light: #e5e5ea;
    --hover-bg: #f5f5f7;

    /* Effects - Apple Style (Soft and Wide) */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --blur: blur(20px);
    --transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);

    /* Typography - San Francisco style */
    --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

/* Reset i podstawy */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-base);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

.mention {
    color: var(--primary);
    font-weight: 600;
}

.hashtag {
    color: var(--primary);
    font-weight: 500;
}

/* Glassmorphism effect - Subtle Apple Style */
.glass {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Karty - nowy minimalistyczny styl */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    margin-bottom: 20px;
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-light);
}

/* Przyciski - nowoczesne z gradientem */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-family: var(--font-base);
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--hover-bg);
    border-color: var(--primary-light);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-full);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

/* Formularze - minimalistyczne */
input,
textarea,
select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-base);
    font-size: 15px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-tertiary);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Avatar */
.avatar {
    border-radius: var(--radius-full);
    object-fit: cover;
    background: var(--bg-tertiary);
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

.avatar-md {
    width: 44px;
    height: 44px;
}

.avatar-lg {
    width: 64px;
    height: 64px;
}

.avatar-xl {
    width: 120px;
    height: 120px;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    background: var(--primary);
    color: white;
}

.badge-secondary {
    background: var(--text-tertiary);
}

.badge-success {
    background: var(--success);
}

.badge-error {
    background: var(--error);
}

/* Utility classes */
.text-primary {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-tertiary {
    color: var(--text-tertiary);
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mt-4 {
    margin-top: 32px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mb-4 {
    margin-bottom: 32px;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.gap-3 {
    gap: 24px;
}

/* Animacje */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pop {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(20px) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 1s linear infinite;
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg,
            var(--bg-tertiary) 0%,
            var(--hover-bg) 50%,
            var(--bg-tertiary) 100%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
}

@keyframes skeleton {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Responsywność */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .card {
        padding: 16px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .card {
        border-radius: var(--radius-md);
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Selection */
::selection {
    background: var(--primary-light);
    color: var(--text-primary);
}

/* Mentions Dropdown */
.mentions-dropdown {
    position: absolute;
    z-index: 9999;
    padding: 8px 0;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    box-shadow: var(--shadow-lg);
}

.mention-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.mention-item:hover,
.mention-item.active {
    background: var(--hover-bg);
}

.mention-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.mention-info {
    display: flex;
    flex-direction: column;
}

.mention-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.mention-username {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Komentarze - ulepszenia */
.comment-item.is-reply {
    margin-left: 44px;
    margin-top: 8px;
    border-left: 2px solid var(--border-light);
    padding-left: 12px;
}

.comment-replies {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-right: 12px;
    transition: var(--transition);
}

.comment-action-btn:hover {
    color: var(--primary);
}

.comment-bubble {
    position: relative;
}

.comment-reaction-badge {
    position: absolute;
    bottom: -10px;
    right: -10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2px 6px;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    animation: pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reaction-picker {
    position: absolute;
    top: -45px;
    left: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 12px;
    display: flex;
    gap: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    animation: slideIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.emoji-btn {
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s;
}

.emoji-btn:hover {
    transform: scale(1.3);
}

.clear-emoji {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

/* Edycja posta */
.post-edit-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.edit-textarea {
    width: 100%;
    min-height: 80px;
    resize: none;
    padding: 12px;
    border: 2px solid var(--primary-light);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 15px;
}

.edit-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}
