/* Modern Premium Post Design - Completely Redesigned */

.post {
    background: linear-gradient(145deg, rgba(30, 32, 34, 0.98), rgba(24, 26, 28, 0.98));
    border-radius: 14px;
    padding: 0;
    margin: 0 0 1rem 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
    box-shadow: 
        0 2px 12px rgba(0, 0, 0, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    width: 100%;
    max-width: 650px;
}

.post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(76, 175, 80, 0.5), 
        rgba(76, 175, 80, 0.7),
        rgba(76, 175, 80, 0.5),
        transparent
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post:hover {
    border-color: rgba(76, 175, 80, 0.2);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(76, 175, 80, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.post:hover::before {
    opacity: 1;
}

/* Post Header - Premium Layout */
.post-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.25rem 1.5rem 0.75rem;
    gap: 0.875rem;
    position: relative;
}

.post-user {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex: 1;
    min-width: 0;
}

.post-avatar {
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.post-avatar:hover {
    transform: scale(1.08);
}

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(76, 175, 80, 0.25);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.25),
        0 1px 3px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(76, 175, 80, 0.08);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-avatar:hover {
    border-color: rgba(76, 175, 80, 0.5);
    transform: scale(1.05);
    box-shadow: 
        0 4px 16px rgba(76, 175, 80, 0.25),
        0 2px 6px rgba(0, 0, 0, 0.2),
        0 0 0 2px rgba(76, 175, 80, 0.15);
}

/* User Info - Enhanced Typography */
.post-user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.post-username {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.post-username:hover {
    color: #4CAF50;
}

.post-separator {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 500;
}

.post-time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Admin & Owner Badges - Premium Design */
.admin-crown,
.owner-crown {
    font-size: 0.85rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.admin-crown {
    color: #ffd700;
}

.owner-crown {
    color: #ff6b6b;
    animation: crownGlow 2s ease-in-out infinite;
}

@keyframes crownGlow {
    0%, 100% {
        filter: drop-shadow(0 0 4px rgba(255, 107, 107, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(255, 107, 107, 1));
    }
}

/* Post Options Menu */
.post-more {
    position: relative;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.post-more:hover {
    background: rgba(76, 175, 80, 0.12);
    border-color: rgba(76, 175, 80, 0.3);
    color: #4CAF50;
    transform: scale(1.1);
}

.post-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: rgba(30, 32, 34, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.375rem;
    min-width: 160px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 100;
}

.post-menu.hidden {
    display: none;
}

/* Post Content - Enhanced Readability */
.post-content {
    padding: 0 1.5rem 1rem;
}

.post-text {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.875rem;
    line-height: 1.65;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* Post Image - Premium Display */
.post-image {
    margin: 1.25rem 0 0;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.post-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.post-image:hover img {
    transform: scale(1.03);
}

/* Poll Display - Modern Card Style */
.poll-container {
    margin: 1rem 0 0;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.poll-question {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.poll-option {
    position: relative;
    margin-bottom: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.poll-option:last-child {
    margin-bottom: 0;
}

.poll-option-button {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.poll-option-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.1));
    width: var(--poll-percentage, 0%);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
}

.poll-option:hover .poll-option-button {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(76, 175, 80, 0.3);
    transform: translateX(4px);
}

.poll-option.selected .poll-option-button {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.5);
    color: #4CAF50;
    font-weight: 600;
}

.poll-option-text {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.poll-percentage {
    font-weight: 700;
    color: #4CAF50;
    font-size: 0.9rem;
}

.poll-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Post Actions - Premium Interactive Design */
.post-actions {
    padding: 0.65rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    flex-shrink: 0;
    overflow: visible;
    height: 36px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.02);
}



.action-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.action-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.action-btn i {
    font-size: 0.95rem;
    transition: transform 0.2s ease;
}

.action-btn:hover i {
    transform: scale(1.08);
    filter: drop-shadow(0 0 8px currentColor);
}

/* Like Button - Red/Pink */
.action-btn.like-btn {
    background: linear-gradient(135deg, rgba(255, 50, 70, 0.12), rgba(255, 50, 70, 0.06));
    border-color: rgba(255, 50, 70, 0.3);
    color: #ff3366;
}

.action-btn.like-btn:hover {
    background: linear-gradient(135deg, rgba(255, 50, 70, 0.25), rgba(255, 50, 70, 0.15));
    border-color: rgba(255, 50, 70, 0.5);
    color: #ff2255;
    box-shadow: 0 4px 20px rgba(255, 50, 70, 0.4), 0 0 20px rgba(255, 50, 70, 0.3);
}

.action-btn.like-btn.liked {
    background: linear-gradient(135deg, rgba(255, 50, 70, 0.3), rgba(255, 50, 70, 0.2));
    border-color: rgba(255, 50, 70, 0.6);
    color: #ff1144;
    box-shadow: 0 4px 16px rgba(255, 50, 70, 0.5), 0 0 12px rgba(255, 50, 70, 0.3);
}

.action-btn.like-btn.liked i {
    animation: heartBeat 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.3) rotate(-10deg); }
    50% { transform: scale(1.1) rotate(5deg); }
    75% { transform: scale(1.2) rotate(-5deg); }
}

/* Comment Button - Blue */
.action-btn.comment-btn {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.08), rgba(96, 165, 250, 0.04));
    border-color: rgba(96, 165, 250, 0.2);
    color: rgba(96, 165, 250, 0.85);
}

.action-btn.comment-btn:hover {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(96, 165, 250, 0.12));
    border-color: rgba(96, 165, 250, 0.4);
    color: #60a5fa;
    box-shadow: 0 4px 20px rgba(96, 165, 250, 0.3), 0 0 20px rgba(96, 165, 250, 0.2);
}

/* Share Button - Green */
.action-btn.share-btn {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.08), rgba(52, 211, 153, 0.04));
    border-color: rgba(52, 211, 153, 0.2);
    color: rgba(52, 211, 153, 0.85);
}

.action-btn.share-btn:hover {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.2), rgba(52, 211, 153, 0.12));
    border-color: rgba(52, 211, 153, 0.4);
    color: #34d399;
    box-shadow: 0 4px 20px rgba(52, 211, 153, 0.3), 0 0 20px rgba(52, 211, 153, 0.2);
}

/* Rate Button - Gold */
.action-btn.rate-btn {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 215, 0, 0.04));
    border-color: rgba(255, 215, 0, 0.2);
    color: rgba(255, 215, 0, 0.85);
}

.action-btn.rate-btn:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.12));
    border-color: rgba(255, 215, 0, 0.4);
    color: #ffd700;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3), 0 0 20px rgba(255, 215, 0, 0.2);
}

/* Delete Button - Keep red */
.action-btn.delete-btn {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.08), rgba(255, 71, 87, 0.04));
    border-color: rgba(255, 71, 87, 0.2);
    color: rgba(255, 71, 87, 0.85);
}

.action-btn.delete-btn:hover {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.2), rgba(255, 71, 87, 0.12));
    border-color: rgba(255, 71, 87, 0.4);
    color: #ff4757;
    box-shadow: 0 4px 20px rgba(255, 71, 87, 0.3), 0 0 20px rgba(255, 71, 87, 0.2);
}

.action-count {
    font-weight: 500;
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
}

/* Focus styles for accessibility */
.action-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3);
    border-color: rgba(76, 175, 80, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .post {
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin: 0 0 1rem 0;
    }
    
    .post-header {
        padding: 1.25rem 1rem 0.875rem;
    }
    
    .post-avatar {
        width: 48px;
        height: 48px;
        border-radius: 50%;
    }
    
    .post-user-name {
        font-size: 1rem;
    }
    
    .post-username {
        font-size: 0.85rem;
    }
    
    .post-content {
        padding: 0 1rem 1rem;
    }
    
    .post-text {
        font-size: 1rem;
        line-height: 1.65;
    }
    
    .post-actions {
        padding: 0.75rem 1rem;
    }
    
    .action-btn {
        padding: 0.55rem 0.75rem;
        font-size: 0.8rem;
        gap: 0.4rem;
        height: 38px;
    }
    
    .action-btn i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .post-header {
        padding: 1rem 0.875rem 0.75rem;
    }
    
    .post-avatar {
        width: 44px;
        height: 44px;
        border-radius: 50%;
    }
    
    .post-content {
        padding: 0 0.875rem 0.875rem;
    }
    
    .post-actions {
        padding: 0.65rem 0.85rem;
    }
    
    .action-btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.75rem;
        gap: 0.35rem;
        height: 36px;
    }
    
    .action-btn i {
        font-size: 0.95rem;
    }
    
    .action-count {
        font-size: 0.75rem;
    }
}


/* Pinned Post Badge */
.pinned-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(76, 175, 80, 0.08) 100%);
    border-left: 3px solid #4CAF50;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    color: #4CAF50;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.pinned-badge i {
    font-size: 0.8rem;
    animation: pinPulse 2s ease-in-out infinite;
}

@keyframes pinPulse {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}
