T.ME/BIBIL_0DAY
CasperSecurity


Server : Apache/2
System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User : gositeme ( 1004)
PHP Version : 8.2.29
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Directory :  /home/gositeme/domains/soundstudiopro.com/public_html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/soundstudiopro.com/public_html/event_details_v2.php
<?php
session_start();
require_once 'config/database.php';

$event_id = $_GET['id'] ?? null;

if (!$event_id) {
    header('Location: /events.php');
    exit;
}

$pdo = getDBConnection();
$user_id = $_SESSION['user_id'] ?? null;

// Get event details
$stmt = $pdo->prepare("
    SELECT 
        e.*,
        u.name as creator_name,
        u.profile_image as creator_image,
        COUNT(DISTINCT ea.user_id) as attendee_count,
        COUNT(DISTINCT el.user_id) as like_count,
        COUNT(DISTINCT ec.id) as comment_count,
        CASE WHEN ea2.user_id IS NOT NULL THEN ea2.status ELSE NULL END as user_rsvp_status
    FROM events e
    JOIN users u ON e.creator_id = u.id
    LEFT JOIN event_attendees ea ON e.id = ea.event_id AND ea.status = 'attending'
    LEFT JOIN event_likes el ON e.id = el.event_id
    LEFT JOIN event_comments ec ON e.id = ec.event_id
    LEFT JOIN event_attendees ea2 ON e.id = ea2.event_id AND ea2.user_id = ?
    WHERE e.id = ? AND e.status = 'published'
    GROUP BY e.id
");

$stmt->execute([$user_id, $event_id]);
$event = $stmt->fetch();

if (!$event) {
    header('Location: /events.php');
    exit;
}

// Get attendees
$stmt = $pdo->prepare("
    SELECT 
        ea.*,
        u.name,
        u.profile_image
    FROM event_attendees ea
    JOIN users u ON ea.user_id = u.id
    WHERE ea.event_id = ?
    ORDER BY ea.rsvp_date DESC
    LIMIT 10
");
$stmt->execute([$event_id]);
$attendees = $stmt->fetchAll();

// Get comments
$stmt = $pdo->prepare("
    SELECT 
        ec.*,
        u.name,
        u.profile_image
    FROM event_comments ec
    JOIN users u ON ec.user_id = u.id
    WHERE ec.event_id = ?
    ORDER BY ec.created_at DESC
    LIMIT 20
");
$stmt->execute([$event_id]);
$comments = $stmt->fetchAll();

// Set page variables for header
$current_page = 'events';
$page_title = $event['title'] . ' - SoundStudioPro Events';
$page_description = $event['description'];

include 'includes/header.php';

// Helper functions
function formatEventDate($start_date, $end_date) {
    $start = new DateTime($start_date);
    $end = new DateTime($end_date);
    
    if ($start->format('Y-m-d') === $end->format('Y-m-d')) {
        return $start->format('l, F j, Y') . ' at ' . $start->format('g:i A');
    } else {
        return $start->format('l, F j, Y g:i A') . ' - ' . $end->format('l, F j, Y g:i A');
    }
}

function getEventTypeIcon($event_type) {
    $icons = [
        'live_music' => 'fas fa-music',
        'workshop' => 'fas fa-graduation-cap',
        'networking' => 'fas fa-users',
        'release_party' => 'fas fa-champagne-glasses',
        'battle' => 'fas fa-trophy',
        'open_mic' => 'fas fa-microphone',
        'studio_session' => 'fas fa-record-vinyl',
        'other' => 'fas fa-calendar'
    ];
    return $icons[$event_type] ?? 'fas fa-calendar';
}

function getEventTypeColor($event_type) {
    $colors = [
        'live_music' => '#667eea',
        'workshop' => '#48bb78',
        'networking' => '#ed8936',
        'release_party' => '#9f7aea',
        'battle' => '#f56565',
        'open_mic' => '#38b2ac',
        'studio_session' => '#ed64a6',
        'other' => '#a0aec0'
    ];
    return $colors[$event_type] ?? '#a0aec0';
}
?>

<div class="event-page">
    <!-- Navigation -->
    <div class="event-nav">
        <div class="container">
            <a href="/events.php" class="back-btn">
                <i class="fas fa-arrow-left"></i>
                <span>Back to Events</span>
            </a>
        </div>
    </div>

    <!-- Event Hero -->
    <div class="event-hero">
        <div class="hero-bg"></div>
        <div class="container">
            <div class="hero-content">
                <div class="event-badge" style="background: <?= getEventTypeColor($event['event_type']) ?>">
                    <i class="<?= getEventTypeIcon($event['event_type']) ?>"></i>
                    <?= ucwords(str_replace('_', ' ', $event['event_type'])) ?>
                </div>
                
                <h1 class="event-title"><?= htmlspecialchars($event['title']) ?></h1>
                
                <div class="event-creator">
                    <div class="creator-avatar">
                        <?= strtoupper(substr($event['creator_name'], 0, 1)) ?>
                    </div>
                    <div class="creator-info">
                        <span class="creator-label">Created by</span>
                        <a href="/artist_profile.php?id=<?= $event['creator_id'] ?>" class="creator-name">
                            <?= htmlspecialchars($event['creator_name']) ?>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Main Content -->
    <div class="event-main">
        <div class="container">
            <div class="event-layout">
                <!-- Left Column -->
                <div class="event-content">
                    <!-- Description -->
                    <div class="content-card">
                        <h2 class="card-title">About This Event</h2>
                        <div class="event-description">
                            <p><?= nl2br(htmlspecialchars($event['description'])) ?></p>
                        </div>
                    </div>

                    <!-- Event Details -->
                    <div class="content-card">
                        <h2 class="card-title">Event Details</h2>
                        <div class="details-list">
                            <div class="detail-row">
                                <div class="detail-icon">
                                    <i class="fas fa-calendar"></i>
                                </div>
                                <div class="detail-info">
                                    <h3>Date & Time</h3>
                                    <p><?= formatEventDate($event['start_date'], $event['end_date']) ?></p>
                                </div>
                            </div>
                            
                            <?php if ($event['location']): ?>
                            <div class="detail-row">
                                <div class="detail-icon">
                                    <i class="fas fa-map-marker-alt"></i>
                                </div>
                                <div class="detail-info">
                                    <h3>Location</h3>
                                    <p><?= htmlspecialchars($event['location']) ?></p>
                                </div>
                            </div>
                            <?php endif; ?>
                            
                            <?php if ($event['venue_name']): ?>
                            <div class="detail-row">
                                <div class="detail-icon">
                                    <i class="fas fa-building"></i>
                                </div>
                                <div class="detail-info">
                                    <h3>Venue</h3>
                                    <p><?= htmlspecialchars($event['venue_name']) ?></p>
                                </div>
                            </div>
                            <?php endif; ?>
                            
                            <div class="detail-row">
                                <div class="detail-icon">
                                    <i class="fas fa-ticket-alt"></i>
                                </div>
                                <div class="detail-info">
                                    <h3>Price</h3>
                                    <p><?= $event['is_free'] ? 'Free' : '$' . number_format($event['ticket_price'], 2) ?></p>
                                </div>
                            </div>
                            
                            <?php if ($event['max_attendees']): ?>
                            <div class="detail-row">
                                <div class="detail-icon">
                                    <i class="fas fa-users"></i>
                                </div>
                                <div class="detail-info">
                                    <h3>Capacity</h3>
                                    <p><?= $event['current_attendees'] ?> / <?= $event['max_attendees'] ?> spots filled</p>
                                </div>
                            </div>
                            <?php endif; ?>
                        </div>
                    </div>

                    <!-- Comments -->
                    <div class="content-card">
                        <h2 class="card-title">Comments (<?= count($comments) ?>)</h2>
                        
                        <?php if ($user_id): ?>
                            <div class="comment-form">
                                <textarea id="commentText" placeholder="Share your thoughts about this event..."></textarea>
                                <button onclick="addComment(<?= $event['id'] ?>)" class="comment-btn">
                                    <i class="fas fa-paper-plane"></i>
                                    Post Comment
                                </button>
                            </div>
                        <?php endif; ?>
                        
                        <div class="comments-list">
                            <?php if (empty($comments)): ?>
                                <div class="no-comments">
                                    <i class="fas fa-comment-slash"></i>
                                    <h3>No comments yet</h3>
                                    <p>Be the first to share your thoughts!</p>
                                </div>
                            <?php else: ?>
                                <?php foreach ($comments as $comment): ?>
                                    <div class="comment-item">
                                        <div class="comment-avatar">
                                            <?= strtoupper(substr($comment['name'], 0, 1)) ?>
                                        </div>
                                        <div class="comment-content">
                                            <div class="comment-header">
                                                <a href="/artist_profile.php?id=<?= $comment['user_id'] ?>" class="comment-author">
                                                    <?= htmlspecialchars($comment['name']) ?>
                                                </a>
                                                <span class="comment-date"><?= date('M j, Y g:i A', strtotime($comment['created_at'])) ?></span>
                                            </div>
                                            <p class="comment-text"><?= nl2br(htmlspecialchars($comment['comment'])) ?></p>
                                        </div>
                                    </div>
                                <?php endforeach; ?>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>

                <!-- Right Sidebar -->
                <div class="event-sidebar">
                    <!-- Action Card -->
                    <div class="sidebar-card">
                        <h3 class="card-title">Join This Event</h3>
                        <?php if ($user_id): ?>
                            <div class="action-buttons">
                                <button class="btn btn-primary btn-large" onclick="rsvpEvent(<?= $event['id'] ?>, 'attending')" 
                                        <?= $event['user_rsvp_status'] === 'attending' ? 'disabled' : '' ?>>
                                    <i class="fas fa-check"></i>
                                    <?= $event['user_rsvp_status'] === 'attending' ? 'Attending' : 'Attend Event' ?>
                                </button>
                                
                                <button class="btn btn-secondary" onclick="rsvpEvent(<?= $event['id'] ?>, 'maybe')"
                                        <?= $event['user_rsvp_status'] === 'maybe' ? 'disabled' : '' ?>>
                                    <i class="fas fa-question"></i>
                                    Maybe
                                </button>
                                
                                <button class="btn btn-outline" onclick="likeEvent(<?= $event['id'] ?>)">
                                    <i class="fas fa-heart"></i>
                                    Like
                                </button>
                                
                                <button class="btn btn-outline" onclick="shareEvent(<?= $event['id'] ?>)">
                                    <i class="fas fa-share"></i>
                                    Share
                                </button>
                            </div>
                        <?php else: ?>
                            <div class="login-prompt">
                                <i class="fas fa-sign-in-alt"></i>
                                <h3>Login to Join</h3>
                                <p>Connect with other attendees and join the community!</p>
                                <a href="/auth/login_new.php" class="btn btn-primary btn-large">
                                    <i class="fas fa-sign-in-alt"></i>
                                    Login to Join
                                </a>
                            </div>
                        <?php endif; ?>
                    </div>

                    <!-- Stats Card -->
                    <div class="sidebar-card">
                        <h3 class="card-title">Event Stats</h3>
                        <div class="stats-grid">
                            <div class="stat-item">
                                <div class="stat-icon">
                                    <i class="fas fa-users"></i>
                                </div>
                                <div class="stat-content">
                                    <span class="stat-number"><?= $event['attendee_count'] ?></span>
                                    <span class="stat-label">Attending</span>
                                </div>
                            </div>
                            <div class="stat-item">
                                <div class="stat-icon">
                                    <i class="fas fa-heart"></i>
                                </div>
                                <div class="stat-content">
                                    <span class="stat-number"><?= $event['like_count'] ?></span>
                                    <span class="stat-label">Likes</span>
                                </div>
                            </div>
                            <div class="stat-item">
                                <div class="stat-icon">
                                    <i class="fas fa-comment"></i>
                                </div>
                                <div class="stat-content">
                                    <span class="stat-number"><?= $event['comment_count'] ?></span>
                                    <span class="stat-label">Comments</span>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- Attendees Card -->
                    <div class="sidebar-card">
                        <h3 class="card-title">Attendees (<?= $event['attendee_count'] ?>)</h3>
                        <div class="attendees-list">
                            <?php if (empty($attendees)): ?>
                                <div class="no-attendees">
                                    <i class="fas fa-user-plus"></i>
                                    <p>No attendees yet</p>
                                    <span>Be the first to join!</span>
                                </div>
                            <?php else: ?>
                                <?php foreach ($attendees as $attendee): ?>
                                    <div class="attendee-item">
                                        <div class="attendee-avatar">
                                            <?= strtoupper(substr($attendee['name'], 0, 1)) ?>
                                        </div>
                                        <div class="attendee-info">
                                            <a href="/artist_profile.php?id=<?= $attendee['user_id'] ?>" class="attendee-name">
                                                <?= htmlspecialchars($attendee['name']) ?>
                                            </a>
                                            <span class="attendee-status"><?= ucfirst($attendee['status']) ?></span>
                                        </div>
                                    </div>
                                <?php endforeach; ?>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<style>
/* Event Page */
.event-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #0a0a0a 100%);
    color: #ffffff;
    position: relative;
}

.event-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(79, 172, 254, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Navigation */
.event-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #4facfe;
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    background: rgba(79, 172, 254, 0.1);
    border: 1px solid rgba(79, 172, 254, 0.3);
    border-radius: 25px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    color: #ffffff;
    background: rgba(79, 172, 254, 0.2);
    border-color: rgba(79, 172, 254, 0.5);
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.3);
}

/* Hero Section */
.event-hero {
    position: relative;
    padding: 4rem 0 6rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 50%, rgba(79, 172, 254, 0.1) 100%);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(102,126,234,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.event-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.event-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #4facfe 0%, #667eea 25%, #764ba2 50%, #f093fb 75%, #4facfe 100%);
    background-size: 300% 300%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.event-creator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.creator-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4facfe, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.creator-avatar:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 35px rgba(79, 172, 254, 0.6);
}

.creator-info {
    text-align: left;
}

.creator-label {
    display: block;
    color: #a0aec0;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.creator-name {
    color: #4facfe;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.creator-name:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Main Content */
.event-main {
    padding: 4rem 0;
    position: relative;
    z-index: 1;
}

.event-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    align-items: start;
}

.event-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Content Cards */
.content-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4facfe, #667eea, #764ba2, #f093fb);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(79, 172, 254, 0.2);
    border-color: rgba(79, 172, 254, 0.4);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.event-description p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e2e8f0;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Details List */
.details-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.1) 0%, rgba(102, 126, 234, 0.05) 100%);
    border: 1px solid rgba(79, 172, 254, 0.3);
    border-radius: 15px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.detail-row:hover {
    transform: translateX(5px);
    border-color: rgba(79, 172, 254, 0.6);
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.3);
}

.detail-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4facfe, #667eea, #764ba2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.detail-icon:hover {
    transform: rotate(10deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.6);
}

.detail-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.detail-info p {
    color: #cbd5e0;
    margin: 0;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Comments */
.comment-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.comment-form textarea {
    flex: 1;
    min-height: 100px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(79, 172, 254, 0.3);
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    resize: vertical;
    font-family: inherit;
    backdrop-filter: blur(10px);
}

.comment-form textarea:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
}

.comment-form textarea::placeholder {
    color: #a0aec0;
}

.comment-btn {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #4facfe, #667eea);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.comment-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4facfe, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author {
    color: #4facfe;
    text-decoration: none;
    font-weight: 600;
}

.comment-author:hover {
    text-decoration: underline;
}

.comment-date {
    font-size: 0.9rem;
    color: #a0aec0;
}

.comment-text {
    color: #e2e8f0;
    line-height: 1.6;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.no-comments {
    text-align: center;
    padding: 3rem 2rem;
    color: #e2e8f0;
}

.no-comments i {
    font-size: 3rem;
    color: #4facfe;
    margin-bottom: 1rem;
}

.no-comments h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Sidebar */
.event-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: sticky;
    top: 2rem;
}

.sidebar-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4facfe, #667eea, #764ba2, #f093fb);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

.sidebar-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(79, 172, 254, 0.2);
    border-color: rgba(79, 172, 254, 0.4);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #4facfe, #667eea);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(79, 172, 254, 0.2);
    border-color: rgba(79, 172, 254, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #a0aec0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    color: white;
    border-color: rgba(79, 172, 254, 0.5);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
}

.login-prompt {
    text-align: center;
    padding: 2rem 1rem;
}

.login-prompt i {
    font-size: 3rem;
    color: #4facfe;
    margin-bottom: 1rem;
}

.login-prompt h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.login-prompt p {
    color: #e2e8f0;
    margin-bottom: 2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Stats */
.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.1) 0%, rgba(102, 126, 234, 0.05) 100%);
    border-radius: 12px;
    border: 1px solid rgba(79, 172, 254, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-item:hover {
    transform: translateX(5px);
    border-color: rgba(79, 172, 254, 0.4);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.2);
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4facfe, #667eea, #764ba2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-icon:hover {
    transform: rotate(10deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.6);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.stat-label {
    font-size: 0.9rem;
    color: #e2e8f0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Attendees */
.attendees-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.attendee-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.attendee-item:hover {
    background: rgba(79, 172, 254, 0.1);
    transform: translateX(5px);
}

.attendee-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4facfe, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
}

.attendee-info {
    display: flex;
    flex-direction: column;
}

.attendee-name {
    color: #4facfe;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.attendee-name:hover {
    text-decoration: underline;
}

.attendee-status {
    font-size: 0.8rem;
    color: #a0aec0;
    text-transform: uppercase;
}

.no-attendees {
    text-align: center;
    padding: 2rem 1rem;
    color: #e2e8f0;
}

.no-attendees i {
    font-size: 2rem;
    color: #4facfe;
    margin-bottom: 0.5rem;
}

.no-attendees p {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.no-attendees span {
    font-size: 0.9rem;
    color: #cbd5e0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .event-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .event-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .event-title {
        font-size: 2.5rem;
    }
    
    .event-hero {
        padding: 3rem 0 4rem;
    }
    
    .event-main {
        padding: 2rem 0;
    }
    
    .content-card,
    .sidebar-card {
        padding: 1.5rem;
    }
    
    .comment-form {
        flex-direction: column;
    }
    
    .action-buttons {
        gap: 0.75rem;
    }
}
</style>

<script>
function rsvpEvent(eventId, status) {
    if (!<?= $user_id ? 'true' : 'false' ?>) {
        if (window.ajaxNavigation) {
            window.ajaxNavigation.navigateToPage('/auth/login_new.php');
        } else {
            window.location.href = '/auth/login_new.php';
        }
        return;
    }
    
    fetch('/api_events.php', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
        },
        body: JSON.stringify({
            action: 'rsvp',
            event_id: eventId,
            status: status
        })
    })
    .then(response => response.json())
    .then(data => {
        if (data.success) {
            location.reload();
        } else {
            alert('Error: ' + data.message);
        }
    })
    .catch(error => {
        console.error('Error:', error);
        alert('An error occurred. Please try again.');
    });
}

function likeEvent(eventId) {
    if (!<?= $user_id ? 'true' : 'false' ?>) {
        if (window.ajaxNavigation) {
            window.ajaxNavigation.navigateToPage('/auth/login_new.php');
        } else {
            window.location.href = '/auth/login_new.php';
        }
        return;
    }
    
    fetch('/api_events.php', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
        },
        body: JSON.stringify({
            action: 'like',
            event_id: eventId
        })
    })
    .then(response => response.json())
    .then(data => {
        if (data.success) {
            location.reload();
        } else {
            alert('Error: ' + data.message);
        }
    })
    .catch(error => {
        console.error('Error:', error);
        alert('An error occurred. Please try again.');
    });
}

function shareEvent(eventId) {
    const url = window.location.href;
    const title = '<?= htmlspecialchars($event['title']) ?>';
    
    if (navigator.share) {
        navigator.share({
            title: title,
            url: url
        });
    } else {
        navigator.clipboard.writeText(url).then(() => {
            alert('Event link copied to clipboard!');
        });
    }
}

function addComment(eventId) {
    const commentText = document.getElementById('commentText').value.trim();
    
    if (!commentText) {
        alert('Please enter a comment');
        return;
    }
    
    fetch('/api_events.php', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
        },
        body: JSON.stringify({
            action: 'comment',
            event_id: eventId,
            comment: commentText
        })
    })
    .then(response => response.json())
    .then(data => {
        if (data.success) {
            location.reload();
        } else {
            alert('Error: ' + data.message);
        }
    })
    .catch(error => {
        console.error('Error:', error);
        alert('An error occurred. Please try again.');
    });
}
</script>

<?php include 'includes/footer.php'; ?>

CasperSecurity Mini