/* MSGBRD.COM - Main Stylesheet */
/* Lightweight, modern CSS with minimal overhead */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light theme (default) */
    --bg-primary: #f8f9fa;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #333;
    --text-secondary: #6c757d;
    --accent-color: #007bff;
    --border-color: #dee2e6;
    --card-bg: #ffffff;
    --header-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --sidebar-bg: #f8f9fa;
    --message-bg: #ffffff;
    --message-border: #e9ecef;
    --button-bg: #007bff;
    --button-hover: #0056b3;
    --success-color: #28a745;
    --error-color: #dc3545;
    --danger-color: #dc3545;
    --danger-hover: #c82333;
    --warning-color: #ffc107;
    
    /* Header button variables */
    --header-btn-bg: #6c757d;
    --header-btn-text: #ffffff;
    --header-btn-border: #6c757d;
    --header-btn-hover-bg: #545b62;
    --header-btn-hover-text: #ffffff;
}

[data-theme="dark"] {
    /* Dark theme */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #404040;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent-color: #4dabf7;
    --border-color: #404040;
    --card-bg: #2d2d2d;
    --header-bg: linear-gradient(135deg, #2d2d2d 0%, #404040 100%);
    --sidebar-bg: #2d2d2d;
    --message-bg: #2d2d2d;
    --message-border: #404040;
    --button-bg: #4dabf7;
    --button-hover: #339af0;
    --success-color: #51cf66;
    --error-color: #ff6b6b;
    --danger-color: #ff6b6b;
    --danger-hover: #ff5252;
    --warning-color: #ffd43b;
    
    /* Header button variables */
    --header-btn-bg: #ffffff;
    --header-btn-text: #000000;
    --header-btn-border: #ffffff;
    --header-btn-hover-bg: #e6e6e6;
    --header-btn-hover-text: #000000;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: all 0.3s ease;
}

.container {
    width: 95%;
    max-width: none;
    margin: 0 auto;
    padding: 0 20px;
}

/* Single Header with Home Icon and Theme Toggle */
header {
    background: var(--header-bg);
    color: white;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    text-align: center;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.home-link {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: 12px;
    transition: all 0.2s;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.home-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    margin: 0 1rem;
}

.topic-indicator {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 500;
}

.theme-toggle {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

/* Remove old header styles - now consolidated above */

.topic-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.topic-link {
    color: white;
    text-decoration: none;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.2);
    transition: all 0.2s;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.topic-link:hover,
.topic-link.active {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* Main content */
main {
    min-height: 60vh;
}

/* Page Container with Left Sidebar Layout */
.page-container {
    display: flex;
    min-height: 100vh;
    margin: 1rem;
    gap: 1.5rem;
    align-items: stretch;
}

.topics-sidebar {
    width: 220px;
    flex-shrink: 0;
    padding: 1rem;
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 0;
    height: calc(100vh - 4rem);
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

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

.topics-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.add-topic-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
    transition: all 0.3s ease;
    margin-left: auto;
}

.add-topic-btn:hover {
    background-color: #e0a800;
    border-color: #e0a800;
    transform: scale(1.1);
}

.main-content {
    flex: 1;
    padding: 0;
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
    min-width: 0;
}

.topics-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.topics-list li {
    margin-bottom: 0.5rem;
}

.topics-list a {
    display: block;
    padding: 0.75rem 1rem;
    color: #ffffff;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: normal;
}

.topics-list a:hover {
    background-color: var(--bg-tertiary);
    color: var(--accent-color);
}

/* Topic-specific colors */
.topics-list a[href*="/work"] { background-color: #f39c12; }
.topics-list a[href*="/personal"] { background-color: #3498db; }
.topics-list a[href*="/reminders"] { background-color: #e74c3c; }
.topics-list a[href*="/urgent"] { background-color: #e74c3c; }
.topics-list a[href*="/ideas"] { background-color: #9b59b6; }
.topics-list a[href*="/expiring"] { background-color: #f1c40f; }
.topics-list a[href*="/completed"] { background-color: #27ae60; }
.topics-list a[href*="/notes"] { background-color: #27ae60; }
.topics-list a[href*="/tasks"] { background-color: #f39c12; }
.topics-list a[href*="/meetings"] { background-color: #34495e; }
.topics-list a[href*="/projects"] { background-color: #16a085; }

.topics-list a.active {
    background-color: var(--accent-color);
    color: white;
    font-weight: bold;
}

.loading-topics {
    color: var(--text-secondary);
    font-style: italic;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

/* Teams section styles */
.teams-section {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.teams-section h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.teams-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.teams-list li {
    margin-bottom: 0.25rem;
}

.teams-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.teams-list a:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateX(2px);
}

.team-role {
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
}

.loading-teams {
    color: var(--text-secondary);
    font-style: italic;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.no-teams {
    color: var(--text-secondary);
    font-style: italic;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.teams-actions {
    margin-top: 0.75rem;
    margin-top: auto;
    flex-shrink: 0;
}

.teams-actions .btn {
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    padding: 0.5rem;
}

/* Board layout with sidebar */
.board-main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

.board-content {
    min-width: 0; /* Prevent grid overflow */
}

/* Static Blocks Sidebar */
.static-blocks-sidebar {
    width: 200px;
    flex-shrink: 0;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.2rem; /* Reduced from 1.5rem (20% smaller) */
    position: sticky;
    top: 2rem;
    height: calc(100vh - 4rem);
    min-height: 600px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.static-blocks-sidebar.collapsed {
    transform: translateX(100%);
    opacity: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem; /* Reduced from 1.5rem (20% smaller) */
    padding-bottom: 0.8rem; /* Reduced from 1rem (20% smaller) */
    border-bottom: 2px solid var(--border-color);
}

.sidebar-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem; /* Reduced from 1.2rem (20% smaller) */
    font-weight: 600;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s;
}

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

.static-blocks-container {
    margin-bottom: 1.2rem; /* Reduced from 1.5rem (20% smaller) */
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.loading-blocks {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 1rem;
}

.no-blocks {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem 1rem;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.static-block {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 0.8rem; /* Reduced from 1rem (20% smaller) */
    margin-bottom: 0.8rem; /* Reduced from 1rem (20% smaller) */
    border-left: 4px solid #007bff;
    transition: all 0.2s;
}

.static-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.clock-block {
    border-left-color: #28a745;
}

.custom-block {
    border-left-color: #ffc107;
}

.weather-block {
    border-left-color: #17a2b8;
}

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

.block-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
}

.delete-block {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}

.delete-block:hover {
    background: #dc3545;
    color: white;
}

.block-content {
    color: #495057;
}

/* Clock Display */
.clock-display {
    text-align: center;
}

.clock-display .time {
    font-size: 1.5rem;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
}

.clock-display .date {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

/* Custom Content */
.custom-content {
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Sidebar Actions */
.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
    flex-shrink: 0;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

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

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

.modal-header h3 {
    margin: 0;
    color: #495057;
}

.close {
    color: #aaa;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 1.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Notifications */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1001;
    animation: notificationSlideIn 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
}

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

.notification.success {
    background: #28a745;
}

.notification.error {
    background: #dc3545;
}

/* User selection grid */
.user-selection h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #495057;
}

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

.user-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.user-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.user-card h3 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.user-card p {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Custom user form */
.custom-user {
    text-align: center;
    margin-bottom: 3rem;
}

.custom-user h3 {
    margin-bottom: 1rem;
    color: #495057;
}

#customUserForm {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

#customUsername {
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    min-width: 200px;
}

/* API info section */
.api-info {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.api-info h2 {
    margin-bottom: 1rem;
    color: #495057;
}

.code-example {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    margin-top: 1rem;
}

.code-example code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Message board styles */
.message-board {
    background: var(--message-bg);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-top: 0;
}

.board-header {
    background: var(--card-bg);
    padding: 1rem;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.board-header h2 {
    color: var(--text-primary);
    margin: 0;
}

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

.board-actions #postBtn {
    background-color: var(--success-color);
    border-color: var(--success-color);
    font-weight: bold;
}

.board-actions #postBtn:hover {
    background-color: var(--success-color);
    filter: brightness(1.1);
}

/* Messages container */
.messages-container {
    padding: 1rem;
    min-height: 150px;
}

.loading {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem;
}

.message-item {
    background: var(--message-bg);
    border: 1px solid #e9ecef;
    border-left: 4px solid #007bff;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    cursor: pointer;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: flex;
    position: relative;
}

/* Message background colors - restore topic-specific backgrounds */
.message-item.has-color {
    background-color: var(--message-color) !important;
    border-left-color: var(--message-border-color) !important;
}

/* Ensure text is always readable on colored backgrounds */
.message-item.has-color .message-header,
.message-item.has-color .message-content {
    color: var(--message-text-color) !important;
}

/* Message header text - always opposite of day/night background for readability */
.message-header,
.message-header *,
.message-meta,
.message-meta *,
.message-meta-left,
.message-meta-left *,
.message-meta-right,
.message-meta-right * {
    color: var(--text-primary) !important;
}

/* Specific overrides for message elements */
.message-header .username,
.message-header .topic,
.message-header .timestamp,
.message-header .message-url,
.message-meta .username,
.message-meta .topic,
.message-meta .timestamp,
.message-meta .message-url {
    color: var(--text-primary) !important;
}

/* Message content text */
.message-content {
    color: var(--text-primary) !important;
}

.message-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateX(2px);
}

.message-item.deleted {
    opacity: 0.6;
    background: #f8f9fa;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
    gap: 0.4rem;
    background: var(--card-bg);
    padding: 12px 16px;
    border-radius: 6px 6px 0 0;
    border-bottom: 2px solid var(--border-color);
}

.message-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.message-meta-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 0.25rem;
    flex-shrink: 0;
}

.message-meta-right .timestamp {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

.message-meta-right .message-url {
    font-size: 0.75rem;
    max-width: 180px;
    word-break: break-all;
}

.message-meta-left {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    flex: 1;
}

.message-url {
    color: #007bff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: right;
    min-width: 120px;
    white-space: nowrap;
}

.message-url:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Removed .message-actions - now using .message-delete-button on right side */

/* Removed .message-actions .btn styles - now using .message-delete-button */

.username {
    font-weight: bold;
    color: var(--text-primary);
}

.original-author {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-left: 0.5rem;
    background-color: var(--bg-tertiary);
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
}

.visibility-indicator {
    font-size: 0.8rem;
    margin-left: 0.5rem;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    background-color: var(--bg-tertiary);
}

.visibility-private {
    color: var(--text-secondary);
}

.visibility-team {
    color: #007bff;
}

.visibility-public {
    color: #28a745;
}

.topic {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Topic bubble with topic-specific colors */
.topic-bubble {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Topic-specific colors for the bubble */
.topic-bubble[data-topic="work"] {
    background-color: #f39c12;
    color: #ffffff;
}

.topic-bubble[data-topic="personal"] {
    background-color: #3498db;
    color: #ffffff;
}

.topic-bubble[data-topic="reminders"] {
    background-color: #e74c3c;
    color: #ffffff;
}

.topic-bubble[data-topic="urgent"] {
    background-color: #e74c3c;
    color: #ffffff;
}

.topic-bubble[data-topic="ideas"] {
    background-color: #9b59b6;
    color: #ffffff;
}

.topic-bubble[data-topic="notes"] {
    background-color: #27ae60;
    color: #ffffff;
}

.topic-bubble[data-topic="tasks"] {
    background-color: #f39c12;
    color: #ffffff;
}

.topic-bubble[data-topic="meetings"] {
    background-color: #34495e;
    color: #ffffff;
}

.topic-bubble[data-topic="projects"] {
    background-color: #16a085;
    color: #ffffff;
}

.topic-bubble[data-topic="health"] {
    background-color: #e67e22;
    color: #ffffff;
}

.topic-bubble[data-topic="finance"] {
    background-color: #d35400;
    color: #ffffff;
}

.topic-bubble[data-topic="travel"] {
    background-color: #8e44ad;
    color: #ffffff;
}

.topic-bubble[data-topic="family"] {
    background-color: #c0392b;
    color: #ffffff;
}

.topic-bubble[data-topic="learning"] {
    background-color: #2980b9;
    color: #ffffff;
}

.topic-bubble[data-topic="shopping"] {
    background-color: #f1c40f;
    color: #000000;
}

.topic-bubble[data-topic="entertainment"] {
    background-color: #9b59b6;
    color: #ffffff;
}

.topic-bubble[data-topic="social"] {
    background-color: #1abc9c;
    color: #ffffff;
}

.topic-bubble[data-topic="goals"] {
    background-color: #e74c3c;
    color: #ffffff;
}

.topic-bubble[data-topic="review"] {
    background-color: #95a5a6;
    color: #ffffff;
}

.topic-bubble[data-topic="general"] {
    background-color: #2c3e50;
    color: #ffffff;
}

/* Expiration indicator */
.expiration-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.expiration-indicator.expiring-soon {
    background: #f39c12;
    color: #ffffff;
    border: 1px solid #e67e22;
}

.expiration-indicator.expiring-today {
    background: #e74c3c;
    color: #ffffff;
    border: 1px solid #c0392b;
}

.expiration-indicator.expired {
    background: #3498db;
    color: #ffffff;
    border: 1px solid #2980b9;
}

.expiration-indicator.expires-later {
    background: #27ae60;
    color: #ffffff;
    border: 1px solid #229954;
}

/* Topic bubble with expiration status */
.topic-bubble {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.6rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
    transition: all 0.2s ease;
    /* Default topic bubble style - high contrast */
    background: #2c3e50;
    color: #ffffff;
    border: 1px solid #34495e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.topic-bubble:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Expiring soon - warning colors */
.topic-bubble.expiring-soon {
    background: #f39c12;
    color: #ffffff;
    border: 1px solid #e67e22;
    box-shadow: 0 1px 3px rgba(243, 156, 18, 0.3);
}

/* Expiring today - urgent colors */
.topic-bubble.expiring-today {
    background: #e74c3c;
    color: #ffffff;
    border: 1px solid #c0392b;
    box-shadow: 0 1px 3px rgba(231, 76, 60, 0.3);
}

/* Expired - info colors */
.topic-bubble.expired {
    background: #3498db;
    color: #ffffff;
    border: 1px solid #2980b9;
    box-shadow: 0 1px 3px rgba(52, 152, 219, 0.3);
}

/* Expires later - success colors */
.topic-bubble.expires-later {
    background: #27ae60;
    color: #ffffff;
    border: 1px solid #229954;
    box-shadow: 0 1px 3px rgba(39, 174, 96, 0.3);
}

/* Expiration time display */
.expiration-time {
    font-size: 0.7rem;
    color: #6c757d;
    margin-top: 0.25rem;
    font-weight: 500;
}

.expiration-time.expiring-soon {
    color: #f39c12;
    font-weight: 600;
}

.expiration-time.expiring-today {
    color: #e74c3c;
    font-weight: 600;
}

.expiration-time.expired {
    color: #3498db;
    font-weight: 600;
}

.expiration-time.expires-later {
    color: #27ae60;
    font-weight: 600;
}

/* Expiration sorting controls */
.expiration-sort {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: auto;
}

.expiration-sort select {
    padding: 0.4rem 0.6rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.8rem;
    background: white;
}

.expiration-sort label {
    font-size: 0.8rem;
    color: #495057;
    margin-bottom: 0;
    margin-right: 0.5rem;
}

.timestamp {
    color: #6c757d;
    font-size: 0.9rem;
}

.message-content {
    color: #333;
    line-height: 1.4;
    margin-bottom: 0.4rem;
    padding: 16px 20px;
}

.message-main-content {
    flex: 1;
    padding: 0.75rem;
}

.message-read-button {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    width: 120px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
}

.message-read-button:hover {
    background: #218838;
    transform: scale(1.02);
}

.message-read-button:active {
    background: #1e7e34;
    transform: scale(0.98);
}

.message-read-button .checkmark {
    color: #ffc107 !important;
    font-size: 2rem;
    font-weight: bold;
}

.message-read-button.read {
    background: #6c757d;
    cursor: default;
}

.message-read-button.read:hover {
    background: #6c757d;
    transform: none;
}

.message-read-button.read .checkmark {
    color: #ffc107 !important;
    font-size: 2rem;
}

.message-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

/* Removed .short-url styles - now using .message-url in header */

/* Post message form */
.post-message {
    background: #f8f9fa;
    padding: 1rem;
    border-top: 1px solid #e9ecef;
}

.post-message h3 {
    margin-bottom: 1rem;
    color: #495057;
}

.form-group {
    margin-bottom: 1rem;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

input, textarea, select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #007bff;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-1px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Message detail page */
.message-detail {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

.message-card {
    padding: 2rem;
    border-left: 4px solid #007bff;
}

.message-details {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.detail-item {
    margin-bottom: 0.5rem;
    color: #6c757d;
}

.actions {
    padding: 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: #6c757d;
    border-top: 1px solid #e9ecef;
    margin-top: 3rem;
}

/* Performance optimizations */
.message-item {
    will-change: transform;
    contain: layout style paint;
}

.static-block {
    will-change: transform;
    contain: layout style paint;
}

/* Mobile-first responsive design */
@media (max-width: 1024px) {
    .page-container {
        flex-direction: column;
    }
    
    .topics-sidebar {
        width: 100%;
        order: -1;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .topics-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .main-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .board-main {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .static-blocks-sidebar {
        position: relative;
        top: 0;
        order: -1;
        margin-bottom: 1rem;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .static-blocks-sidebar.collapsed {
        transform: none;
        opacity: 1;
        max-height: 60px;
        overflow: hidden;
    }
    
    .static-blocks-sidebar.collapsed .static-blocks-container,
    .static-blocks-sidebar.collapsed .sidebar-actions {
        display: none;
    }
    

}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
        width: 98%;
    }
    
    header h1 {
        font-size: 1.2rem;
    }
    
    header {
        padding: 0.6rem 0;
        margin-bottom: 0.75rem;
    }
    
    nav {
        padding: 0 0.75rem;
    }
    
    .home-link,
    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
    
    .header-content {
        margin: 0 0.5rem;
    }
    
    .topic-indicator {
        font-size: 0.8rem;
    }
    
    .board-main {
        gap: 0.75rem;
    }
    
    .static-blocks-sidebar {
        padding: 1rem;
        border-radius: 8px;
    }
    
    .sidebar-header h3 {
        font-size: 1.1rem;
    }
    
    .static-block {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .clock-display .time {
        font-size: 1.3rem;
    }
    
    .clock-display .date {
        font-size: 0.8rem;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        border-radius: 8px;
    }
    
    .modal-header,
    .modal-body {
        padding: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .user-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .board-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    #customUserForm {
        flex-direction: column;
        align-items: center;
    }
    
    .topic-filter {
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
    }
    
    .topic-link {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .message-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .message-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        width: 100%;
    }
    
    .message-meta-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .message-url {
        text-align: left;
        min-width: auto;
    }
    
    .message-item {
        flex-direction: column;
    }
    
    .message-read-button {
        width: 100%;
        border-radius: 0 0 6px 6px;
        padding: 0.75rem;
        min-height: 44px;
    }
    
    .message-item {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .post-message {
        padding: 0.75rem;
    }
    
    .post-message h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    input, textarea, select {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    header h1 {
        font-size: 1.4rem;
    }
    
    .static-blocks-sidebar {
        padding: 0.75rem;
    }
    
    .sidebar-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    .static-block {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .clock-display .time {
        font-size: 1.1rem;
    }
    
    .clock-display .date {
        font-size: 0.75rem;
    }
    
    .topic-filter {
        gap: 0.2rem;
    }
    
    .topic-link {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
    
    .message-item {
        padding: 0.4rem;
        margin-bottom: 0.4rem;
    }
    
    .message-content {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    .username {
        font-size: 0.9rem;
    }
    
    .timestamp {
        font-size: 0.8rem;
    }
    
    .expiration-indicator {
        font-size: 0.65rem;
        padding: 0.15rem 0.3rem;
    }
    
    .topic-bubble {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

/* Touch-friendly improvements for mobile */
@media (hover: none) and (pointer: coarse) {
    .message-item {
        cursor: default;
    }
    
    .btn {
        min-height: 44px; /* iOS recommended touch target size */
    }
    
    .topic-link {
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .delete-block {
        min-height: 32px;
        min-width: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .message-item:hover {
        transform: none;
    }
    
    .topic-link:hover {
        transform: none;
    }
    
    .static-block:hover {
        transform: none;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .message-item {
        border-width: 0.5px;
    }
    
    .btn {
        border-width: 0.5px;
    }
    
    .static-block {
        border-width: 0.5px;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .topic-filter {
        flex-direction: row;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .message-header {
        flex-direction: row;
        align-items: center;
    }
    
    .message-meta {
        flex-direction: row;
        align-items: center;
        flex: 1;
    }
    
    .message-actions {
        width: 120px;
        margin-left: auto;
        margin-top: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        height: 100%;
        gap: 0;
        flex-shrink: 0;
    }

    .action-top {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 8px;
        width: 100%;
        min-height: 60px;
    }

    .action-bottom {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-grow: 1;
        padding: 8px;
        width: 100%;
        min-height: 120px;
    }
    
    .qr-code-container {
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: transform 0.2s ease;
        height: 100%;
        width: 100%;
        padding: 8px;
    }
    
    .qr-code-container:hover {
        transform: scale(1.1);
    }
    
    .qr-code {
        width: 100%;
        height: 100%;
        max-width: 120px;
        max-height: 120px;
        border-radius: 6px;
        border: 1px solid var(--border-color);
        background: white;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 80px;
        min-height: 80px;
    }

/* Message Detail Page Styles */
.message-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.edit-message-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-sm);
}

.edit-message-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item strong {
    min-width: 120px;
    color: var(--text-primary);
}

}

.back-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Message Detail Page QR Code */
.message-detail .qr-code {
    width: 200px;
    height: 200px;
    border: 2px solid var(--border-color);
    background: white;
    padding: 8px;
    border-radius: 8px;
}

/* Message Details Section */
.message-details-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: var(--shadow-sm);
}

.message-details-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.details-grid {
    display: grid;
    gap: 1rem;
}

.details-grid .detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.details-grid .detail-item strong {
    min-width: 120px;
    color: var(--text-primary);
    font-weight: 600;
}

.details-grid .detail-item .btn {
    margin-left: auto;
}

.static-blocks-sidebar {
    max-height: 200px;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .message-item,
    .static-block,
    .topic-link {
        transition: none;
    }
    
    .modal-content {
        animation: none;
    }
    
    .notification {
        animation: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .static-blocks-sidebar {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .sidebar-header h3 {
        color: #e2e8f0;
    }
    
    .static-block {
        background: #4a5568;
        color: #e2e8f0;
    }
    
    .block-header h4 {
        color: #e2e8f0;
    }
    
    .block-content {
        color: #e2e8f0;
    }
    
    .no-blocks {
        background: #4a5568;
        border-color: #718096;
        color: #a0aec0;
    }
    
    .modal-content {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .modal-header {
        border-bottom-color: #4a5568;
    }
    
    .close {
        color: #a0aec0;
    }
    
    .close:hover {
        color: #e2e8f0;
    }
}

/* Utility classes */
.text-center { text-align: center; }
.text-muted { color: #6c757d; }
.mb-2 { margin-bottom: 1rem; }
.mt-2 { margin-top: 1rem; }
.hidden { display: none; }

/* Topic-specific colors for navigation links */
.topic-link.topic-work {
    background-color: #f39c12;
    border-color: #e67e22;
}

.topic-link.topic-personal {
    background-color: #3498db;
    border-color: #2980b9;
}

.topic-link.topic-reminders {
    background-color: #e74c3c;
    border-color: #c0392b;
}

.topic-link.topic-urgent {
    background-color: #e74c3c;
    border-color: #c0392b;
}

.topic-link.topic-ideas {
    background-color: #9b59b6;
    border-color: #8e44ad;
}

.topic-link.topic-completed {
    background-color: #27ae60;
    border-color: #229954;
}

/* Team-specific styles */
.team-sidebar {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

/* Teams List Page Styles */
.teams-section {
    margin-bottom: 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #666;
    font-size: 1.1rem;
}

.header-actions {
    margin-left: auto;
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.team-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.team-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

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

.team-header h3 {
    color: #2c3e50;
    margin: 0;
    font-size: 1.3rem;
}

.team-status {
    background: #27ae60;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.team-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
    min-height: 3rem;
}

.team-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.team-stats .stat {
    background: #f8f9fa;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #495057;
}

.team-actions {
    display: flex;
    gap: 0.75rem;
}

.team-actions .btn {
    flex: 1;
    text-align: center;
}

.no-teams {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 1.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: #27ae60;
}

.notification-error {
    background: #e74c3c;
}

/* Team Navigation Styles */
.team-navigation {
    text-align: center;
    margin-bottom: 2rem;
}

.teams-browse-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    text-decoration: none;
}

.team-info h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.team-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.team-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.team-members h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.team-members ul {
    list-style: none;
    padding: 0;
}

.team-member {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.team-member:last-child {
    border-bottom: none;
}

.member-name {
    font-weight: 600;
    color: #2c3e50;
}

.member-role {
    background: #e9ecef;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #495057;
}

.member-joined {
    font-size: 0.8rem;
    color: #6c757d;
}

.static-blocks h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.static-block {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.static-block.clock {
    border-left-color: var(--success-color);
}

.static-block.info {
    border-left-color: var(--accent-color);
}

.static-block.weather {
    border-left-color: var(--warning-color);
}

.static-block h5 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
}

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

/* Team message styles */
.team-message {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: var(--card-bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.team-message:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

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

.team-message .message-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.team-message .message-author {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.team-message .message-type {
    background: var(--accent-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
}

.message-type-task {
    border-left-color: #ffc107 !important;
}

.message-type-reminder {
    border-left-color: #dc3545 !important;
}

.message-type-announcement {
    border-left-color: #6f42c1 !important;
}

.completion-required {
    border-left-width: 8px !important;
}

.completion-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    border-left: 4px solid #28a745;
}

.completion-item {
    background: white;
    padding: 0.8rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    border: 1px solid #e9ecef;
}

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

.completion-time {
    font-size: 0.8rem;
    color: #6c757d;
}

.completion-notes {
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
}

/* Team message detail styles */
.team-context {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.team-context h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.team-context p {
    margin-bottom: 0.5rem;
    color: #666;
}

/* Responsive team layout */
@media (min-width: 768px) {
    main {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 2rem;
        align-items: start;
    }
    
    .team-sidebar {
        margin-top: 0;
        position: sticky;
        top: 2rem;
    }
}

@media (max-width: 767px) {
    .team-sidebar {
        order: 2;
    }
    
    main {
        display: flex;
        flex-direction: column;
    }
}

/* Team sidebar collapse functionality */
.team-sidebar.collapsed {
    max-height: 100px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* Error and success messages */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    border: 1px solid #c3e6cb;
}

/* Button states */
.btn.completed {
    background: #28a745;
    color: white;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Smart text contrast for message readability */
.message-card {
    position: relative;
}

.message-card .message-content {
    position: relative;
    z-index: 1;
}

/* Auto-contrast text based on background color */
.message-card[style*="background-color"] .message-content,
.message-card[style*="border-left-color"] .message-content {
    /* This will be enhanced with JavaScript for dynamic contrast calculation */
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .message-card {
        border: 2px solid #000;
    }
    
    .team-message {
        border: 2px solid #000;
    }
}

/* Team collaboration section on index page */
.team-collaboration {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.team-collaboration h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.8rem;
}

.team-collaboration > p {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

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

.feature-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #007bff;
    transition: all 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.feature-card h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.feature-card p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.quick-team-access {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.quick-team-access h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.quick-team-access p {
    color: #666;
    margin-bottom: 1rem;
}

.team-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.team-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.team-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    color: white;
}

/* Responsive adjustments for team features */
@media (max-width: 768px) {
    .team-features {
        grid-template-columns: 1fr;
    }
    
    .team-links {
        flex-direction: column;
        align-items: center;
    }
    
    .team-link {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }
}

/* Offline Page Styles */
.offline-main {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.offline-content {
    text-align: center;
    max-width: 600px;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.offline-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.offline-content h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.offline-content p {
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.offline-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.offline-features {
    text-align: left;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.offline-features h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.offline-features ul {
    list-style: none;
    padding: 0;
}

.offline-features li {
    color: #495057;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.offline-features li:before {
    content: '✅';
    position: absolute;
    left: 0;
}

.connection-status {
    margin-top: 2rem;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.status-indicator.online {
    background: #d4edda;
    color: #155724;
}

.status-indicator.offline {
    background: #f8d7da;
    color: #721c24;
}

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

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

.offline-footer {
    text-align: center;
    padding: 2rem 0;
    color: #6c757d;
    border-top: 1px solid #e9ecef;
}

.offline-message {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    font-weight: 600;
}

.offline-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

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

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

/* Weather and Stock Block Styles */
.weather-display, .stock-display {
    padding: 1rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
}

.weather-display.error, .stock-display.error {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border-color: #feb2b2;
    color: #c53030;
}

.weather-icon {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.weather-main {
    text-align: center;
    margin-bottom: 1rem;
}

.temperature {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.condition {
    font-size: 1rem;
    color: #6c757d;
    text-transform: capitalize;
}

.weather-details, .stock-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.detail {
    font-size: 0.9rem;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cache-info {
    font-size: 0.8rem;
    color: #6c757d;
    text-align: center;
    padding-top: 0.5rem;
    border-top: 1px solid #dee2e6;
    font-style: italic;
}

/* Stock Block Specific Styles */
.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.stock-symbol {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.stock-price {
    font-size: 1.8rem;
    font-weight: bold;
    color: #28a745;
}

.stock-change {
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 6px;
}

.stock-change.positive {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.stock-change.negative {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Enhanced Static Block Styles */
.static-block.weather-block .block-content,
.static-block.stock-block .block-content {
    padding: 0;
}

.static-block.weather-block .block-header,
.static-block.stock-block .block-header {
    background: var(--header-bg);
    color: white;
    border-radius: 12px 12px 0 0;
    margin: -1rem -1rem 1rem -1rem;
    padding: 1rem;
}

.static-block.weather-block .block-header h4,
.static-block.stock-block .block-header h4 {
    color: white;
    margin: 0;
}

/* Responsive adjustments for weather/stock blocks */
@media (max-width: 768px) {
    .weather-details, .stock-details {
        grid-template-columns: 1fr;
    }
    
    .stock-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .temperature {
        font-size: 1.5rem;
    }
    
    .stock-price {
        font-size: 1.5rem;
    }
}

/* PWA Install Prompt */
.pwa-install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    max-width: 400px;
    text-align: center;
}

.pwa-install-prompt h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.pwa-install-prompt p {
    margin: 0 0 1rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.pwa-install-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.pwa-install-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Enhanced Mobile Styles for PWA */
@media (max-width: 768px) {
    .offline-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .offline-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .offline-actions .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .pwa-install-prompt {
        left: 1rem;
        right: 1rem;
        transform: none;
        max-width: none;
    }
}

/* PWA-specific enhancements */
@media (display-mode: standalone) {
    /* Styles when app is running in standalone mode */
    header {
        padding-top: env(safe-area-inset-top);
    }
    
    .container {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    footer {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Touch-friendly improvements for mobile */
@media (hover: none) and (pointer: coarse) {
    .btn, .topic-link, .user-card, .team-link {
        min-height: 44px;
        min-width: 44px;
    }
    
    .static-block .delete-block {
        min-height: 32px;
        min-width: 32px;
    }
    
    .form-group input, .form-group textarea, .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Authentication Section Styles */
.auth-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.auth-section h2 {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    font-weight: 600;
}

.auth-section p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-size: 1.1rem;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.auth-buttons .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.auth-buttons .btn-primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.auth-buttons .btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.auth-buttons .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.auth-buttons .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.auth-buttons .btn-tertiary {
    background: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.auth-buttons .btn-tertiary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Authentication Modal Styles */
#authModal {
    z-index: 1000;
}

#authModal .modal-content {
    max-width: 450px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
}

#authModal .modal-header {
    background: var(--header-bg);
    color: white;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    padding: 1.5rem;
    position: relative;
}

#authModal .modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.close-modal:hover {
    opacity: 1;
}

/* Authentication Tabs */
.auth-tabs {
    display: flex;
    background: var(--bg-tertiary);
    margin: 0;
    border-bottom: 1px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.auth-tab.active {
    color: var(--accent-color);
    background: var(--card-bg);
    border-bottom-color: var(--accent-color);
}

.auth-tab:hover {
    background: var(--card-bg);
    color: var(--text-primary);
}

/* Authentication Forms */
.auth-form {
    display: none;
    padding: 2rem;
}

.auth-form.active {
    display: block;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

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

.auth-form input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--card-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.auth-form .btn {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.5rem;
    border-radius: 8px;
}

.auth-form .btn-primary {
    background: var(--accent-color);
    color: white;
    border: none;
}

.auth-form .btn-primary:hover {
    background: var(--button-hover);
    transform: translateY(-1px);
}

/* Authentication Messages */
.auth-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
}

.auth-message.success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.auth-message.error {
    background: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.auth-message.info {
    background: rgba(0, 123, 255, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(0, 123, 255, 0.2);
}

/* Dark theme support for auth elements */
[data-theme="dark"] .auth-section {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
}

[data-theme="dark"] #authModal .modal-content {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .auth-form input {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .auth-form input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.1);
}

/* Mobile responsive adjustments for auth */
@media (max-width: 768px) {
    .auth-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .auth-section h2 {
        font-size: 1.5rem;
    }
    
    .auth-section p {
        font-size: 1rem;
    }
    
    .auth-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .auth-buttons .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    #authModal .modal-content {
        margin: 2rem auto;
        width: 95%;
        max-width: 400px;
    }
    
    .auth-form {
        padding: 1.5rem;
    }
    
    .auth-tab {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .auth-section {
        padding: 1rem;
        border-radius: 12px;
    }
    
    #authModal .modal-content {
        margin: 1rem auto;
        width: 98%;
    }
    
    .auth-form {
        padding: 1rem;
    }
}

/* User Controls */
.user-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.profile-btn,
.admin-btn {
    padding: 0.5rem;
    font-size: 1.2rem;
    border-radius: 8px;
    border: 1px solid var(--header-btn-border);
    background: var(--header-btn-bg);
    color: var(--header-btn-text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-btn:hover,
.admin-btn:hover {
    background: var(--header-btn-hover-bg);
    color: var(--header-btn-hover-text);
    transform: translateY(-2px);
}

.logout-btn {
    padding: 0.5rem;
    font-size: 1.2rem;
    border-radius: 8px;
    border: 1px solid var(--header-btn-border);
    background: var(--header-btn-bg);
    color: var(--header-btn-text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: var(--header-btn-hover-bg);
    color: var(--header-btn-hover-text);
    transform: translateY(-2px);
}

/* Profile Modal Styles */
.profile-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.profile-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.profile-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.profile-tab:hover {
    color: var(--accent-color);
}

.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
}

/* API Token Tab Styles */
.api-token-info h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.api-token-info p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.api-token-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.api-token-display code {
    flex: 1;
    padding: 0.5rem;
    background: var(--card-bg);
    border-radius: 4px;
    font-family: monospace;
    color: var(--text-primary);
    word-break: break-all;
}

.api-token-actions {
    text-align: center;
}

.api-token-actions small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* cURL Reference Styles */
.curl-reference {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.curl-reference summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.5rem 0;
    font-size: 1.1rem;
}

.curl-reference summary:hover {
    color: var(--accent-color);
}

.curl-commands {
    margin-top: 1rem;
}

.curl-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.curl-section h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.curl-command {
    display: block;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-all;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.curl-command:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Admin Panel Styles */
.admin-header {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-card h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #dc3545;
}

.users-section {
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.section-header {
    background: var(--bg-tertiary);
    padding: 1rem 1.5rem;
    border-radius: 15px 15px 0 0;
    border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
    margin: 0;
    color: var(--text-primary);
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th,
.users-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.users-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
}

.users-table tr:hover {
    background: var(--bg-tertiary);
}

.user-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-admin {
    background: #dc3545;
    color: white;
}

.status-user {
    background: #28a745;
    color: white;
}

.btn-view {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.3s ease;
}

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

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-link:hover {
    text-decoration: underline;
    color: var(--accent-hover);
}
