/* Enhanced Social Feed & Authentication Styling */

/* Social Feed Container */
.social-section {
    margin: 2rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    display: block;
}

.social-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.social-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.create-post-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.create-post-btn:hover {
    background: #e55a2b;
    transform: translateY(-2px);
}

.create-post-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Social Feed Posts */
.social-feed-container {
    max-width: 800px;
    margin: 0 auto;
}

.social-post {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.social-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 1rem;
    object-fit: cover;
}

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.admin-badge {
    background: #ff6b35;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-left: 0.5rem;
    font-weight: 600;
}

.post-time {
    color: #666;
    font-size: 0.8rem;
    margin-left: 1rem;
}

.post-content {
    color: #333;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.post-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.like-btn, .comment-btn, .chat-btn {
    background: none;
    border: 1px solid #e0e0e0;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.like-btn:hover {
    background: #e3f2fd;
    border-color: #2196f3;
}

.comment-btn:hover {
    background: #f3e5f5;
    border-color: #9c27b0;
}

.chat-btn {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
}

.chat-btn:hover {
    background: #e55a2b;
    border-color: #e55a2b;
}

/* Game Info in Posts */
.game-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    border-left: 4px solid #ff6b35;
}

.game-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.game-details span {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #333;
}

.spots-left {
    background: #e8f5e8 !important;
    color: #2e7d32 !important;
    font-weight: 600;
}

.join-game-btn {
    background: #4caf50;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.join-game-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

/* Empty Feed State */
.empty-feed {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.empty-feed h3 {
    margin-bottom: 1rem;
    color: #333;
}

/* Authentication UI */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-weight: 600;
    color: #333;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 150px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
}

.user-dropdown button {
    width: 100%;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    transition: background 0.3s ease;
}

.user-dropdown button:hover {
    background: #f5f5f5;
}

.user-profile:hover + .user-dropdown,
.user-dropdown:hover {
    display: block;
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.login-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: #e55a2b;
    transform: translateY(-2px);
}

/* Chat Modal Styling */
#chat-modal {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.chat-message {
    transition: all 0.3s ease;
}

.chat-message:hover {
    background: #f9f9f9;
    padding: 0.5rem;
    border-radius: 8px;
}

/* Auth Message */
.auth-message {
    border-radius: 8px;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.auth-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.auth-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Login Modal */
#login-modal {
    animation: fadeIn 0.3s ease;
}

#login-modal > div {
    position: relative;
    animation: slideInUp 0.3s ease;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .social-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .social-post {
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    .post-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .game-details {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .user-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .auth-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #login-modal > div {
        width: 95%;
        padding: 1.5rem;
    }
    
    #chat-modal > div {
        width: 95%;
        height: 90%;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .social-section {
        background: #2c2c2c;
        color: white;
    }
    
    .social-post {
        background: #3c3c3c;
        color: white;
    }
    
    .post-content {
        color: #e0e0e0;
    }
    
    .game-info {
        background: #2c2c2c;
        color: white;
    }
    
    .game-details span {
        background: #4c4c4c;
        color: white;
    }
    
    .user-dropdown {
        background: #3c3c3c;
        border-color: #555;
    }
    
    .user-dropdown button {
        color: white;
    }
    
    .user-dropdown button:hover {
        background: #555;
    }
}