/* Fistchat Styles */

:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f3460;
    --accent: #e94560;
    --accent-hover: #ff6b6b;
    --text-primary: #ffffff;
    --text-secondary: #b8b8b8;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
}

/* Mobile-friendly base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Prevent zoom on double-tap for iOS */
    touch-action: manipulation;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    /* Prevent pull-to-refresh on mobile */
    overscroll-behavior: none;
    /* Prevent text selection on long press */
    -webkit-user-select: none;
    user-select: none;
}

/* Allow text selection in chat messages and inputs */
.message-text,
.username-input,
.message-input,
.channel-item {
    -webkit-user-select: text;
    user-select: text;
}

.loading-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-primary);
}

.loading-screen h1 {
    color: var(--accent);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.app-layout {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* Main App Layout */
.app-container {
    display: flex;
    height: 100vh;
    height: 100dvh;
}

/* Channel Sidebar */
.channel-sidebar {
    width: 240px;
    background-color: var(--bg-secondary);
    display: flex;
    flex-direction: column;
}

.channel-header {
    padding: 16px;
    border-bottom: 1px solid var(--bg-tertiary);
    font-weight: bold;
}

.channel-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.channel-item {
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    transition: background-color 0.2s;
}

.channel-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.channel-item.active {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.channel-item i {
    font-size: 1.2rem;
}

.channel-item .channel-delete-icon {
    display: none;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: color 0.2s;
    padding: 4px;
}

.channel-item:hover .channel-delete-icon {
    display: block;
}

.channel-delete-icon:hover {
    color: var(--danger) !important;
}

.create-channel-inline {
    padding: 12px;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    margin: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.new-channel-input, .new-channel-select {
    padding: 8px;
    background-color: var(--bg-primary);
    border: 1px solid var(--bg-tertiary);
    border-radius: 4px;
    color: var(--text-primary);
    width: 100%;
}

.new-channel-select option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

/* User Panel */
.user-panel {
    padding: 12px;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent);
    display: flex;
    justify-content: center;
    align-items: center;
}

.user-info {
    flex: 1;
}

.user-status {
    font-size: 0.75rem;
    color: var(--success);
}

/* Main Chat Area */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-primary);
}

.chat-header {
    padding: 16px;
    border-bottom: 1px solid var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    flex-shrink: 0;
}

.message-content {
    flex: 1;
}

.message-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.message-username {
    font-weight: bold;
    color: var(--accent);
}

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

.message-text {
    color: var(--text-primary);
    line-height: 1.5;
}

/* Message Input */
.message-input-container {
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    background-color: var(--bg-primary);
}

.message-input {
    flex: 1;
    padding: 12px 16px;
    background-color: var(--bg-secondary);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px; /* Prevents iOS zoom on focus */
    /* Mobile-friendly tap target */
    min-height: 48px;
}

.send-button {
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    /* Ensure mobile responsiveness */
    position: relative;
    z-index: 12;
    pointer-events: auto;
    touch-action: manipulation;
}

.send-button:active {
    transform: scale(0.9);
    opacity: 0.8;
}

.send-button:hover:not(:disabled) {
    background-color: var(--accent-hover);
    transform: scale(1.05);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.message-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent);
}

/* Voice/Video Panel */
.call-panel {
    width: 300px;
    background-color: var(--bg-secondary);
    display: flex;
    flex-direction: column;
}

.call-header {
    padding: 16px;
    border-bottom: 1px solid var(--bg-tertiary);
    font-weight: bold;
}

.participants-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 4px;
}

.participant-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
}

.call-controls {
    padding: 16px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.call-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.call-btn:hover {
    background-color: var(--accent);
}

.call-btn.active {
    background-color: var(--danger);
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    padding: 16px;
}

.video-container {
    position: relative;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Username Modal */
.username-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.username-modal {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1001;
}

.username-modal h2 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

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

.username-input {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px; /* Prevents iOS zoom on focus */
    margin-bottom: 1rem;
    text-align: center;
    /* Make input easier to tap on mobile */
    min-height: 48px;
}

.username-input:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-join {
    width: 100%;
    padding: 12px 24px;
    font-size: 1rem;
    cursor: pointer;
    /* Mobile-friendly tap target */
    min-height: 48px;
    /* Visual feedback on tap */
    -webkit-tap-highlight-color: transparent;
}

.btn-join:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    /* Ensure disabled state is visually clear on mobile */
    filter: grayscale(100%);
}

/* Explicit disabled class for mobile browser compatibility */
.btn-join.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(100%);
}

/* Joining state */
.btn-join.joining {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: wait;
}

/* Spinner animation */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-small {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

/* Message input loading state */
.message-input-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Landing Page Styles */

.landing-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content .accent {
    color: var(--accent);
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--bg-tertiary);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

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

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.chat-preview {
    display: flex;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
}

.preview-sidebar {
    width: 60px;
    background-color: var(--bg-primary);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-server-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    transition: border-radius 0.2s;
}

.preview-server-icon:hover {
    border-radius: 12px;
}

.preview-channels {
    width: 140px;
    background-color: var(--bg-secondary);
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-channel {
    height: 32px;
    background-color: var(--bg-tertiary);
    border-radius: 4px;
    opacity: 0.5;
}

.preview-chat {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-message {
    height: 40px;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    opacity: 0.3;
}

/* Features Section */

.features {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background-color: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: var(--accent);
}

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

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Downloads Section */

.downloads {
    padding: 4rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.downloads h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.downloads-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.download-card {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border: 2px solid transparent;
}

.download-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.15);
}

.download-icon {
    width: 80px;
    height: 80px;
    background-color: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    color: var(--accent);
}

.download-card h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.25rem;
}

.download-card p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

.download-btn {
    background-color: var(--accent);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    transition: all 0.2s;
}

.download-card:hover .download-btn {
    background-color: var(--accent-hover);
}

/* Download Pages */

.download-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding-bottom: 4rem;
}

.download-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.download-header {
    text-align: center;
    margin-bottom: 3rem;
}

.platform-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background-color: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3.5rem;
    color: var(--accent);
}

.download-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.download-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.download-option {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.2s;
    position: relative;
}

.download-option:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.download-option.featured {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(233, 69, 96, 0.2);
}

.recommended-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent);
    color: var(--text-primary);
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.download-option h3 {
    margin: 1rem 0 0.5rem;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.download-option p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.btn-download {
    background-color: var(--accent);
    color: var(--text-primary);
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-download:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.store-btn {
    background-color: var(--bg-tertiary);
}

.store-btn:hover {
    background-color: var(--accent);
}

.version-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
}

.install-command {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--bg-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.install-command code {
    flex: 1;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.btn-copy {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-copy:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.installation-instructions {
    margin-bottom: 3rem;
}

.installation-instructions h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.instruction-card {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.instruction-card h4 {
    color: var(--accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.instruction-card ol {
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.instruction-card ol li {
    margin-bottom: 0.5rem;
}

.instruction-card pre {
    background-color: var(--bg-primary);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 1rem 0;
}

.instruction-card code {
    background-color: var(--bg-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    color: var(--accent);
}

.instruction-card p {
    color: var(--text-secondary);
    margin-top: 1rem;
}

.system-requirements {
    margin-bottom: 3rem;
}

.system-requirements h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.requirement {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.requirement i {
    font-size: 2rem;
    color: var(--accent);
}

.requirement span {
    color: var(--text-secondary);
}

.mobile-features {
    margin-bottom: 2rem;
}

.mobile-features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.mobile-feature {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.mobile-feature i {
    font-size: 2rem;
    color: var(--accent);
    flex-shrink: 0;
}

.mobile-feature h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.mobile-feature p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* About Section */

.about {
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.tech-badge {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Footer */

.footer {
    padding: 2rem;
    text-align: center;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border-top: 1px solid var(--bg-tertiary);
}

/* Simplified Hero Section */

.hero-simple {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6rem 2rem 4rem;
    min-height: 60vh;
}

.hero-content-simple {
    text-align: center;
    max-width: 800px;
}

.hero-content-simple h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content-simple .accent {
    color: var(--accent);
}

.hero-content-simple .tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Placeholder Download Cards */

.download-card.placeholder {
    opacity: 0.7;
    cursor: default;
}

.download-card.placeholder:hover {
    transform: none;
    border-color: transparent;
    box-shadow: none;
}

/* Responsive */

/* Tablet and Mobile Responsive Layout */
@media (max-width: 1024px) {
    .hero, .hero-simple {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1rem;
    }

    .hero-content h1, .hero-content-simple h1 {
        font-size: 2.5rem;
    }

    .hero-content-simple .tagline {
        font-size: 1rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .nav-links {
        gap: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    /* Tablet and Mobile App Layout - Channel list on top, chat in middle, input at bottom */
    .app-container {
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
        /* Ensure container fills viewport on mobile/tablet */
        min-height: -webkit-fill-available;
        min-height: fill-available;
        /* Prevent overscroll on mobile/tablet */
        overscroll-behavior: none;
    }

    .channel-sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
        border-bottom: 1px solid var(--bg-tertiary);
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
    }

    .channel-header {
        padding: 12px;
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    .channel-list {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 8px;
        gap: 8px;
        max-height: none;
        flex-shrink: 0;
        /* Hide scrollbar but allow scrolling */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .channel-list::-webkit-scrollbar {
        display: none;
    }

    .channel-item {
        white-space: nowrap;
        padding: 8px 16px;
        font-size: 0.9rem;
        min-height: 40px;
        display: flex;
        align-items: center;
    }

    .user-panel {
        display: flex;
        padding: 8px 12px;
        border-top: 1px solid var(--bg-tertiary);
        background-color: var(--bg-primary);
    }

    .user-avatar {
        width: 32px;
        height: 32px;
    }

    .user-info {
        font-size: 0.8rem;
    }

    .chat-main {
        flex: 1;
        min-height: 0;
        /* Ensure chat area expands to fill available space */
        display: flex;
        flex-direction: column;
        overflow: hidden;
        /* Ensure proper height calculation on mobile */
        height: 100%;
    }

    .chat-header {
        padding: 12px;
        flex-shrink: 0;
    }

    .chat-messages {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        padding: 12px;
        /* Smooth scrolling */
        -webkit-overflow-scrolling: touch;
        /* Prevent expanding beyond available space */
        max-height: 100%;
    }

    .message-input-container {
        padding: 12px;
        flex-shrink: 0;
        /* Ensure input stays at bottom and is always visible */
        position: sticky;
        bottom: 0;
        background-color: var(--bg-primary);
        z-index: 10;
        /* Ensure tap target is accessible */
        pointer-events: auto;
        /* Add shadow to indicate scrollable area above */
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
    }

    .message-input {
        /* Ensure input is always selectable */
        position: relative;
        z-index: 11;
        pointer-events: auto;
        touch-action: manipulation;
    }

    .call-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 50vh;
        z-index: 100;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 8px;
    }

    .participants-list {
        display: flex;
        overflow-x: auto;
        padding: 8px;
        gap: 8px;
    }

    .participant-item {
        flex-direction: column;
        min-width: 60px;
        text-align: center;
        font-size: 0.75rem;
    }

    .call-controls {
        padding: 12px;
    }

    .call-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .hero-content h1, .hero-content-simple h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .channel-sidebar {
        max-height: 140px;
    }

    .channel-list {
        gap: 4px;
    }

    .channel-item {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
}
