/* CSS Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #FF6B35;
    --primary-light: #FF8A5B;
    --primary-dark: #E85A2B;
    --secondary: #06FFA5;
    --accent: #FFD23F;
    --background: #FAFAFA;
    --surface: #FFFFFF;
    --text-primary: #2D3748;
    --text-secondary: #4A5568;
    --border: #E2E8F0;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 4px 20px rgba(0, 0, 0, 0.12);
    --radius: 16px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

/* Utility Classes */
.hidden { display: none !important; }
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Header */
.header {
    background: var(--surface);
    padding: 1rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.qr-btn {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-btn:hover {
    background: #3db8b0;
    transform: translateY(-1px);
}

.install-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.install-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Main Content */
.content {
    padding: 1rem;
    padding-bottom: 6rem; /* Space for bottom nav */
    max-width: 800px;
    margin: 0 auto;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

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

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

.tab-header h2 {
    font-size: 1.3rem;
    color: var(--text-primary);
}

/* Buttons */
.add-btn, .submit-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}

.add-btn:hover, .submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

.photo-btn {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.photo-btn:hover {
    background: #3db8b0;
}

/* Events List */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid var(--primary);
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

.event-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}

.event-actions {
    display: flex;
    gap: 0.5rem;
}

.edit-btn, .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.edit-btn {
    color: var(--secondary);
}

.edit-btn:hover {
    background: rgba(78, 205, 196, 0.1);
}

.delete-btn {
    color: var(--primary);
}

.delete-btn:hover {
    background: rgba(255, 107, 107, 0.1);
}

.event-datetime {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-location {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-notes {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.event-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Post Form */
.post-form {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.post-form input,
.post-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    resize: vertical;
}

.post-form input:focus,
.post-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

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

.photo-preview {
    margin-top: 0.75rem;
    text-align: center;
}

.photo-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* Posts List */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-strong);
}

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

.post-author {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

.post-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.post-content {
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 1rem;
    white-space: pre-wrap;
}

.post-photo {
    text-align: center;
    margin-bottom: 1rem;
}

.post-photo img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.post-photo img:hover {
    transform: scale(1.02);
}

.post-actions {
    display: flex;
    justify-content: flex-end;
}

.post-delete {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.post-delete:hover {
    color: var(--primary);
    background: rgba(255, 107, 107, 0.1);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    padding: 0.75rem;
    display: flex;
    justify-content: space-around;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 80px;
}

.nav-btn.active {
    color: var(--primary);
    background: rgba(255, 107, 107, 0.1);
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.nav-btn.active:hover {
    background: rgba(255, 107, 107, 0.15);
}

.nav-icon {
    font-size: 1.2rem;
}

.nav-label {
    font-size: 0.75rem;
    font-weight: 600;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-strong);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { 
        opacity: 0; 
        transform: translateY(-20px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.modal-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.form-actions {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    border-top: 1px solid var(--border);
}

.form-actions button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.form-actions button[type="submit"] {
    background: var(--primary);
    color: white;
}

.form-actions button[type="submit"]:hover {
    background: var(--primary-dark);
}

.form-actions button[type="button"] {
    background: var(--border);
    color: var(--text-primary);
}

.form-actions button[type="button"]:hover {
    background: #d5d5d5;
}

#eventForm {
    padding: 1.5rem;
    padding-top: 0;
}

/* PIN Modal */
#pinModal .modal-content {
    text-align: center;
    padding: 2rem;
}

#pinModal h2 {
    margin-bottom: 1rem;
    color: var(--primary);
}

#pinInput {
    margin: 1rem 0;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    font-size: 1.1rem;
    max-width: 200px;
}

#pinInput:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

#pinModal button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

#pinModal button:hover {
    background: var(--primary-dark);
}

.error {
    color: var(--primary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Connection Status */
.connection-status {
    position: fixed;
    bottom: 6rem;
    right: 1rem;
    background: var(--surface);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    animation: slideInRight 0.3s ease-out;
}

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

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Up Next Card */
.up-next-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-strong);
    position: relative;
    overflow: hidden;
}

.up-next-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.up-next-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.up-next-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    position: relative;
}

.up-next-time {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.up-next-countdown {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.8;
}

.up-next-location {
    font-size: 0.9rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.up-next-location a {
    color: inherit;
    text-decoration: underline;
}

/* Weather Widget */
.weather-widget {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent);
}

.weather-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.weather-forecast {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.weather-day {
    text-align: center;
    padding: 0.75rem;
    background: var(--background);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.weather-day-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.weather-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.weather-temp {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.weather-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Guest Profiles */
.guests-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--secondary);
}

.guests-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.guests-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.guest-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: var(--shadow);
    position: relative;
}

.guest-avatar.recent::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: var(--secondary);
    border: 2px solid var(--surface);
    border-radius: 50%;
}

.add-guest {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px dashed var(--border);
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.add-guest:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(255, 107, 53, 0.1);
}

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

.poll-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid var(--accent);
}

.poll-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-strong);
}

.poll-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.poll-question {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}

.poll-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: right;
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.poll-option {
    position: relative;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--background);
    border: 2px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
}

.poll-option:hover {
    border-color: var(--primary);
}

.poll-option.voted {
    border-color: var(--primary);
    background: rgba(255, 107, 53, 0.1);
}

.poll-option-bg {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 0.1;
    transition: width 0.5s ease;
    pointer-events: none;
}

.poll-option-content {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1;
}

.poll-option-text {
    font-weight: 600;
    color: var(--text-primary);
}

.poll-option-votes {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
}

.poll-form {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.poll-form h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.poll-form input,
.poll-form button {
    width: 100%;
    margin-bottom: 0.75rem;
}

.poll-options-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.poll-option-input {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.poll-option-input input {
    flex: 1;
    margin-bottom: 0;
}

.remove-option {
    background: var(--primary);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    margin-bottom: 0;
}

.add-poll-option {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

/* Name Modal */
.name-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.name-modal-content {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-strong);
}

.name-modal h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.name-modal p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.name-modal input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1rem;
}

.name-modal input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.name-modal button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.name-modal button:hover {
    background: var(--primary-dark);
}

/* Map Links */
.map-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: var(--transition);
}

.map-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.map-icon {
    font-size: 0.9rem;
}

/* Homer Chat Styles */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 60vh;
    max-height: 500px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--background);
}

.message {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    max-width: 85%;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.homer {
    align-self: flex-start;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.message.homer .message-avatar {
    background: linear-gradient(135deg, #8B4513, #A0522D);
}

.message-bubble {
    background: var(--surface);
    padding: 0.75rem 1rem;
    border-radius: 18px;
    box-shadow: var(--shadow);
    position: relative;
    word-wrap: break-word;
}

.message.user .message-bubble {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.homer .message-bubble {
    background: #F7F7F7;
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.message-text {
    line-height: 1.4;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

.typing-indicator {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    margin-left: 1rem;
    margin-bottom: 1rem;
}

.homer-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.typing-bubble {
    background: #F7F7F7;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.typing-dots {
    display: flex;
    gap: 0.25rem;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typing 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

.typing-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
}

.chat-input-container {
    padding: 1rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.75rem;
}

.chat-input-container input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 25px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.chat-input-container input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.chat-input-container button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.chat-input-container button:hover {
    background: var(--primary-dark);
}

.chat-input-container button:disabled {
    background: var(--border);
    cursor: not-allowed;
}

/* Emoji Reactions */
.post-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.reaction-buttons {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.reaction-btn {
    background: none;
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.reaction-btn:hover {
    border-color: var(--primary);
    transform: scale(1.1);
}

.reaction-btn.active {
    border-color: var(--primary);
    background: rgba(255, 107, 53, 0.1);
    animation: reactionPop 0.3s ease;
}

@keyframes reactionPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.reaction-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
}

.reaction-display {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.reaction-item {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.reaction-emoji {
    font-size: 1rem;
}

.reaction-item-count {
    font-weight: 600;
    color: var(--text-secondary);
}

/* Jukebox Styles */
.song-form {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.song-form h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.song-form input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.song-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.song-queue {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.song-card {
    background: var(--surface);
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.song-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-strong);
}

.song-card.now-playing {
    border: 2px solid var(--primary);
    background: rgba(255, 107, 53, 0.05);
    animation: pulse 2s infinite;
}

.song-card.played {
    opacity: 0.6;
    background: var(--background);
}

@keyframes pulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(255, 107, 53, 0);
    }
}

.song-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.song-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.song-artist {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.song-meta {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.song-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.vote-button {
    background: none;
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 60px;
    justify-content: center;
}

.vote-button:hover {
    border-color: var(--secondary);
    background: rgba(6, 255, 165, 0.1);
}

.vote-button.voted {
    border-color: var(--secondary);
    background: var(--secondary);
    color: white;
}

.vote-count {
    font-weight: 600;
}

.status-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.status-button:hover {
    background: var(--primary-dark);
}

.status-button.playing {
    background: var(--secondary);
}

.status-button.played {
    background: var(--text-secondary);
}

.delete-song-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.delete-song-btn:hover {
    background: rgba(255, 0, 0, 0.1);
    color: #ff4444;
}

/* Five-tab Navigation */
.bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

/* Responsive Design */
@media (min-width: 768px) {
    .content {
        padding: 2rem;
        padding-bottom: 6rem;
    }
    
    .tab-header h2 {
        font-size: 1.5rem;
    }
    
    .event-card,
    .post-card,
    .poll-card {
        padding: 1.5rem;
    }
    
    .modal-content {
        max-width: 600px;
    }
    
    .post-actions {
        justify-content: flex-end;
    }
    
    .weather-forecast {
        gap: 1.5rem;
    }
    
    .up-next-card {
        padding: 2rem;
    }
}

@media (min-width: 1024px) {
    .content {
        padding: 2rem 2rem 6rem;
    }
    
    .events-list,
    .posts-list,
    .polls-list {
        gap: 1.5rem;
    }
}