/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #003d7a;
    --secondary-color: #00b5e2;
    --accent-color: #ffb81c;
    --text-color: #1f2937;
    --bg-color: #f0f8ff;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Header and Navigation */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

nav h1 {
    font-size: 1.8rem;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Medium screens - slightly smaller title to prevent wrapping */
@media (min-width: 769px) and (max-width: 1024px) {
    nav h1 {
        font-size: 1.4rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-menu a {
        padding: 0.5rem 0.75rem;
        font-size: 0.95rem;
    }
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 3px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
    padding: 0.5rem 1rem;
    display: block;
}

.nav-menu a:hover {
    opacity: 0.8;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 2rem;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

/* Cruise Info Card */
.cruise-info-card {
    background: var(--card-bg);
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 6px rgba(0,61,122,0.1);
}

.cruise-info-card h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-item {
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.info-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.25rem;
}

/* Stats Cards */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    margin-bottom: 0.5rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s;
    box-shadow: 0 4px 6px rgba(0,61,122,0.3);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,61,122,0.4);
}

.stat-card h3 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.stat-card .countdown-label {
    font-size: 1.5rem;
    margin-left: 0.2rem;
    margin-right: 0.5rem;
    font-weight: normal;
}

.stat-card p {
    font-size: 0.9rem;
    color: white;
    opacity: 1;
}

/* Check-in Reminder Banner */
.checkin-reminder-banner {
    margin: 1rem 0 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.checkin-reminder-banner .banner-content {
    padding: 1rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.checkin-reminder-banner .banner-content.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.checkin-reminder-banner .banner-content.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.checkin-reminder-banner .banner-content.urgent {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.checkin-reminder-banner .banner-content.complete {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Content Sections */
.content-section {
    min-height: 200px;
    color: #6b7280;
}

/* Itinerary Styles */
.itinerary-day {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: #f8fafc;
    border-left: 4px solid var(--secondary-color);
    border-radius: 4px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.itinerary-day:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,181,226,0.2);
}

.day-number {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    min-width: 80px;
    height: fit-content;
    text-align: center;
}

.day-details h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.day-date {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.day-times {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.day-description {
    color: #4b5563;
    font-size: 0.95rem;
}

/* Family Roster Styles */
.roster-form-container {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.roster-form-container h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-group input {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 181, 226, 0.3);
}

/* Deck and Cabin Organization */
.deck-section {
    margin-bottom: 3rem;
}

.deck-header {
    color: var(--primary-color);
    font-size: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--bg-color), white);
    border-left: 4px solid var(--secondary-color);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.cabin-groups {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.cabin-group {
    background: var(--card-bg);
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    padding: 1rem;
}

.cabin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.cabin-number {
    font-size: 1.2rem;
    font-weight: bold;
}

.cabin-count {
    font-size: 0.9rem;
    opacity: 0.9;
}

.cabin-members {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 0.5rem;
}

.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.member-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.member-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 61, 122, 0.1);
}

.member-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.member-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.member-info h4 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.crown-badge {
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
}

.member-details {
    margin: 1rem 0;
    font-size: 0.95rem;
}

.member-details p {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.member-details a {
    color: var(--secondary-color);
    text-decoration: none;
}

.member-details a:hover {
    text-decoration: underline;
}

.member-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-edit {
    flex: 1;
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-edit:hover {
    background: #0096c4;
}

.btn-delete {
    flex: 1;
    background: #ef4444;
    color: white;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-delete:hover {
    background: #dc2626;
}

.empty-state {
    text-align: center;
    color: #6b7280;
    padding: 3rem;
    font-style: italic;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    transition: transform 0.3s ease-out;
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.active {
    display: block;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 2% auto;
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: var(--primary-color);
}

.form-section {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.form-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

/* Readiness Dashboard */
.readiness-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.readiness-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 61, 122, 0.2);
}

.readiness-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.readiness-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
}

.readiness-header .progress-bar-container {
    flex: 1;
    height: 20px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.readiness-header .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    transition: width 0.3s;
}

.readiness-progress {
    font-size: 1rem;
    font-weight: bold;
    color: var(--secondary-color);
    white-space: nowrap;
    min-width: 45px;
    text-align: right;
}

.progress-bar-container {
    background: var(--bg-color);
    border-radius: 10px;
    height: 20px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.5rem;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

.readiness-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
}

/* Status banner with split layout */
.status-banner {
    grid-column: 1 / -1;
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 2px solid #00b5e2;
}

.banner-action {
    flex: 3;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.banner-action:hover {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

.banner-hint {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
}

.banner-status {
    flex: 1;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
}

.banner-status.complete {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.banner-status.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.banner-status.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.banner-status.urgent {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.status-item.complete {
    color: #10b981;
}

.status-item.incomplete {
    color: #ef4444;
}

.status-item.optional {
    color: #6b7280;
}

.section-description {
    color: #6b7280;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: var(--text-color);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* Responsive Design */
/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Mobile Navigation */
    .hamburger {
        display: flex;
    }
    
    nav {
        padding: 0 1rem;
    }
    
    nav h1 {
        font-size: 1.3rem;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.2);
        gap: 0;
        padding: 1rem 0;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 0;
    }
    
    .nav-menu a {
        padding: 1rem;
        width: 100%;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-menu li:last-child a {
        border-bottom: none;
    }
    
    /* Mobile Content */
    main {
        padding: 1rem;
    }
    
    section {
        padding: 1rem;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobile Tables */
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
    
    /* Mobile Forms */
    input, select, textarea, button {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Mobile Cards */
    .cruise-info-card,
    .stat-card,
    .readiness-card {
        margin: 0.5rem 0;
    }
}

/* Chat Styles */
.connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f3f4f6;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    justify-content: space-between;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #9ca3af;
}

.status-indicator.connected {
    background: #10b981;
    animation: pulse 2s infinite;
}

.current-user {
    color: var(--primary-color);
    font-weight: 600;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Chat layout with sidebar */
.chat-layout {
    display: flex;
    gap: 1rem;
    height: 600px;
    max-height: 70vh;
}

/* Channel sidebar */
.channel-sidebar {
    width: 250px;
    background: white;
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.btn-create-channel {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: white;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-create-channel:hover {
    transform: scale(1.1);
}

.channel-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.channel-item {
    padding: 0.75rem;
    margin-bottom: 0.25rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.channel-item:hover {
    background: #f3f4f6;
}

.channel-item.active {
    background: linear-gradient(135deg, rgba(0, 181, 226, 0.1), rgba(0, 61, 122, 0.1));
    border-left: 4px solid var(--secondary-color);
}

.channel-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.channel-topic {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.15rem;
}

.unread-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.chat-container {
    flex: 1;
    background: white;
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, rgba(0, 181, 226, 0.05), rgba(0, 61, 122, 0.05));
}

.chat-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.chat-header .channel-topic {
    margin: 0.25rem 0 0 0;
    font-size: 0.85rem;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #f8fafc;
}

.message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    word-wrap: break-word;
}

.message.own {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    border-bottom-right-radius: 4px;
}

.message.other {
    align-self: flex-start;
    background: white;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}

.message-sender {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--accent-color);
}

.message.own .message-sender {
    color: rgba(255, 255, 255, 0.9);
}

.message-text {
    font-size: 0.95rem;
    line-height: 1.4;
}

.message-time {
    font-size: 0.7rem;
    margin-top: 0.25rem;
    opacity: 0.7;
}

.message-input-container {
    padding: 1rem;
    background: white;
    border-top: 1px solid #e5e7eb;
}

.message-input-row {
    display: flex;
    gap: 0.5rem;
}

#message-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    font-size: 0.95rem;
    font-family: inherit;
}

#message-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.send-button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    border: none;
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.send-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 181, 226, 0.3);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* User selection */
.user-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.user-item {
    padding: 1rem;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.user-item:hover {
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 181, 226, 0.2);
}

.user-item-name {
    font-weight: 600;
    color: var(--primary-color);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .chat-layout {
        flex-direction: column;
        height: auto;
    }
    
    .channel-sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
    }
    
    .chat-container {
        height: calc(100vh - 400px);
        min-height: 400px;
    }
    
    .message {
        max-width: 85%;
    }
}

/* Arrival Summary Tabs */
.arrival-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.arrival-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.arrival-tab:hover {
    color: var(--primary-color);
    background: rgba(0, 61, 122, 0.05);
}

.arrival-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
    font-weight: 600;
}

@media (max-width: 768px) {
    .arrival-tabs {
        gap: 0.25rem;
        overflow-x: auto;
    }
    
    .arrival-tab {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }
}

/* Help Button */
.help-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 99;
    transition: all 0.3s ease;
}

.help-button:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.help-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.help-modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.help-modal-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.help-modal-content ul {
    list-style-position: inside;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.help-modal-content li {
    margin-bottom: 0.5rem;
}

.help-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

.help-close:hover {
    color: var(--text-color);
}

@media (max-width: 768px) {
    .help-button {
        bottom: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    .help-modal-content {
        margin: 10% 1rem;
        padding: 1.5rem;
    }
}


/* Activity Cards */
.activity-card {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.activity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

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

.activity-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

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

.activity-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.activity-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background-color: var(--light-gray);
    border-radius: 12px;
    font-size: 0.85rem;
}

.activity-badge.location-onboard {
    background-color: #e3f2fd;
    color: #1976d2;
}

.activity-badge.location-shore {
    background-color: #fff3e0;
    color: #f57c00;
}

.activity-badge.location-both {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.activity-details {
    color: var(--text-color);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.activity-participants {
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

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

.participants-count {
    font-weight: 600;
    color: var(--secondary-color);
}

.participants-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.participant-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--light-gray);
    border-radius: 12px;
    font-size: 0.85rem;
}

.participant-tag.is-current-user {
    background-color: #e8f5e9;
    color: #2e7d32;
    font-weight: 500;
}

/* Radio and Checkbox Groups */
.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-label, .checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.radio-label:hover, .checkbox-label:hover {
    background-color: var(--light-gray);
}

.radio-label input, .checkbox-label input {
    margin-right: 0.5rem;
    cursor: pointer;
}

.checkbox-group {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.75rem;
}

.btn-join {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.btn-join:hover {
    background-color: #45a049;
}

.btn-leave {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.btn-leave:hover {
    background-color: #d32f2f;
}

@media (max-width: 768px) {
    .activity-header {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .activity-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .activity-actions {
        width: 100%;
    }
    
    .activity-actions button {
        flex: 1;
    }
}

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

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.empty-state p:first-child {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* User Selection Modal */
.user-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 1rem;
}

.user-item {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.user-item:hover {
    background-color: var(--light-gray);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.user-item-name {
    font-weight: 500;
    color: var(--text-color);
}

.current-user-display {
    position: fixed;
    top: 80px;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    z-index: 900;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .current-user-display {
        top: 60px;
        right: 0.5rem;
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}

/* PWA Install Button */
.pwa-install-button {
    position: fixed;
    bottom: 5rem;
    right: 1rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    z-index: 1000;
    display: none;
    transition: all 0.3s ease;
}

.pwa-install-button:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.pwa-install-button:active {
    transform: translateY(0);
}

/* Update Notification Banner */
.update-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    animation: slideDown 0.3s ease;
}

.update-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.update-content span {
    font-weight: 500;
}

.btn-update, .btn-dismiss {
    padding: 0.5rem 1rem;
    border: 2px solid white;
    background: transparent;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-update:hover {
    background: white;
    color: #667eea;
}

.btn-dismiss {
    border: 1px solid rgba(255,255,255,0.5);
}

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

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* PWA Mode - Hide browser UI elements when running as installed app */
.pwa-mode .help-button {
    bottom: 1rem; /* Adjust since no browser chrome */
}

@media (max-width: 768px) {
    .pwa-install-button {
        bottom: 4rem;
        right: 0.5rem;
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .update-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .update-content > div {
        display: flex;
        gap: 0.5rem;
        width: 100%;
    }
    
    .btn-update, .btn-dismiss {
        flex: 1;
        padding: 0.6rem;
    }
}

/* iOS PWA Installation Banner */
.ios-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.2);
    z-index: 10000;
    animation: slideUp 0.4s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.ios-install-content {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.ios-close-btn {
    position: absolute;
    top: -0.5rem;
    right: 0;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ios-close-btn:hover {
    background: rgba(255,255,255,0.3);
}

.ios-install-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.ios-install-content h3 {
    margin: 0 0 1rem 0;
    font-size: 1.3rem;
    text-align: center;
}

.ios-install-content p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.ios-install-content ol {
    background: rgba(255,255,255,0.1);
    padding: 1rem 1rem 1rem 2rem;
    border-radius: 8px;
    margin: 1rem 0;
    line-height: 1.8;
}

.ios-install-content ol li {
    margin: 0.5rem 0;
}

.ios-install-content ol li strong {
    font-weight: 600;
    color: #fff;
}

.ios-install-content ol li svg {
    vertical-align: middle;
    margin: 0 0.25rem;
}

.ios-note {
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 1rem !important;
}

.ios-install-banner.fade-out {
    animation: slideDown 0.3s ease forwards;
}

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

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

@media (max-width: 480px) {
    .ios-install-banner {
        padding: 1rem;
    }
    
    .ios-install-content h3 {
        font-size: 1.1rem;
    }
    
    .ios-install-content ol {
        font-size: 0.9rem;
        padding: 0.75rem 0.75rem 0.75rem 1.75rem;
    }
}
