/* Custom CSS Variables */
:root {
    --primary-color: #4F46E5;
    --secondary-color: #7C3AED;
    --accent-color: #06B6D4;
    --background-color: #F8FAFC;
    --surface-color: #FFFFFF;
    --text-color: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --purple-glow: #8B5CF6;
    --purple-light: #A855F7;
}

/* Dark theme variables */
[data-theme="dark"] {
    --background-color: #0F172A;
    --surface-color: #1E293B;
    --text-color: #F1F5F9;
    --text-muted: #94A3B8;
    --border-color: #334155;
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: all 0.3s ease;
}

.container {
    max-width: 100vw;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Control buttons */
.controls {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--surface-color);
    border-radius: 16px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: var(--primary-color);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn i {
    font-size: 16px;
}

/* Org chart container */
.org-chart {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
    position: relative;
    padding: 20px;
    background: transparent;
}

/* Circle container for community layout */
.circle-container {
    position: relative;
    width: 90vw;
    height: 90vw;
    max-width: 1200px;
    max-height: 1200px;
    margin: 10px auto 30px auto;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Community center circle - hidden on home page */
.community-center {
    display: none;
}

/* Member cards */
.member-card {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 15;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    border: 3px solid white;
}

.member-card:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
    z-index: 20;
}

.circular-card {
    /* Remove animation that interferes with positioning */
    opacity: 1;
}

/* Member card content */
.member-avatar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 4px;
}

.member-name {
    font-weight: 600;
    text-align: center;
    line-height: 1.0;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.member-title {
    font-size: 0.8rem;
    opacity: 0.9;
    text-align: center;
}

.member-department {
    font-size: 0.7rem;
    opacity: 0.7;
    text-align: center;
}

/* Draggable functionality */
.circular-card.dragging {
    opacity: 0.7;
    transform: scale(1.1);
    z-index: 1000;
    cursor: grabbing !important;
}

.circular-card {
    cursor: grab;
}

.circular-card:hover {
    transform: scale(1.05);
}

/* Priority panels */
.priorities-panel {
    padding: 30px;
    background: var(--surface-color);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    max-width: 1000px;
    margin: 0 auto;
}

/* Priority order indicator */
.priority-order-info {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.priority-order-info p {
    margin: 0;
    color: var(--text-color);
    font-size: 0.9rem;
}

.priority-order-info i {
    color: var(--primary-color);
    margin-right: 8px;
}

.priorities-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.priorities-title {
    flex: 1;
}

.priority-add-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.priority-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.priorities-panel h2 {
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 2rem;
}

.priorities-panel p {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Priority controls */
.priority-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.priority-filters, .retreat-priority-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.priority-sorting {
    display: none; /* Hidden - using drag and drop instead */
}

.priority-sorting label {
    color: var(--text-color);
    font-weight: 500;
    white-space: nowrap;
}

.sort-select {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-color);
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Priority color key */
.priority-color-key {
    background: var(--background-color);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.priority-color-key h3 {
    margin-bottom: 15px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-key-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.color-key-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.high-color {
    background: linear-gradient(135deg, #8B5CF6, #A855F7);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.medium-color {
    background: linear-gradient(135deg, #F59E0B, #F97316);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.low-color {
    background: linear-gradient(135deg, #10B981, #059669);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

/* Priority grid - now a single column list */
.priorities-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px 0;
    max-width: 800px;
    margin: 0 auto;
}

/* Futuristic priority container - now horizontal list item */
.futuristic-priority-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--surface-color);
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    cursor: move;
    position: relative;
}

.futuristic-priority-container:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.futuristic-priority-container.dragging {
    opacity: 0.5;
    transform: scale(1.02);
    z-index: 1000;
}

.futuristic-priority-container.drag-over {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.05);
}

/* Priority circle - smaller for list view */
.futuristic-priority-circle {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--purple-glow), var(--purple-light));
    border: 2px solid white;
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    flex-shrink: 0;
    font-size: 1.2rem;
    font-weight: bold;
}

.futuristic-priority-circle:active {
    cursor: grabbing;
}

.futuristic-priority-circle.dragging {
    opacity: 0.7;
    transform: scale(1.05);
    z-index: 1000;
    animation: none;
}

.futuristic-priority-container.drag-over {
    transform: translateX(10px);
    transition: transform 0.2s ease;
}

@keyframes purpleGlow {
    0% {
        box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4), 
                    0 0 40px rgba(139, 92, 246, 0.3),
                    inset 0 0 20px rgba(255, 255, 255, 0.1);
    }
    100% {
        box-shadow: 0 8px 25px rgba(139, 92, 246, 0.6), 
                    0 0 60px rgba(139, 92, 246, 0.5),
                    inset 0 0 30px rgba(255, 255, 255, 0.2);
    }
}

.futuristic-priority-circle:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.6), 
                0 0 80px rgba(139, 92, 246, 0.7),
                inset 0 0 40px rgba(255, 255, 255, 0.3);
}

.priority-circle-content {
    text-align: center;
    padding: 5px;
    display: none; /* Hide text in circle for list view */
}

/* Priority info section for list view */
.priority-list-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.priority-list-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.priority-list-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.priority-list-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.priority-list-category {
    font-size: 0.8rem;
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border-radius: 12px;
    font-weight: 500;
}

.priority-list-urgency {
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

.priority-list-urgency.high {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.priority-list-urgency.medium {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.priority-list-urgency.low {
    background: rgba(34, 197, 94, 0.1);
    color: #059669;
}

/* Contributors container - horizontal for list view */
.contributors-circle-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    overflow-x: auto;
    padding: 5px;
}

/* Priority drag handle */
.priority-drag-handle {
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    color: var(--text-muted);
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.futuristic-priority-container:hover .priority-drag-handle {
    opacity: 0.6;
}

.priority-drag-handle:hover {
    opacity: 1 !important;
}

.priority-drag-handle:active {
    cursor: grabbing;
}

/* Contributor circles - smaller for list view */
.futuristic-contributor-circle {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: 2px solid white;
    color: white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
    flex-shrink: 0;
}

.futuristic-contributor-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}

.contributor-circle-avatar {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 2px;
    background: rgba(255, 255, 255, 0.2);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contributor-circle-name {
    font-size: 8px;
    font-weight: 600;
    text-align: center;
    line-height: 1;
    padding: 0 2px;
}

/* Modal styles - Mobile Safari Optimized */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px); /* Safari support */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.modal-content {
    background-color: var(--surface-color);
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--background-color);
    border-radius: 16px 16px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.close {
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--text-color);
}

/* Form styles */
form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--background-color);
    color: var(--text-color);
    transition: all 0.3s ease;
}

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

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

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-danger {
    background: #EF4444;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Modern Member Details Modal */
.modern-member-header {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 16px;
    color: white;
    position: relative;
    overflow: hidden;
}

.modern-member-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    z-index: -1;
}

.modern-member-avatar {
    flex-shrink: 0;
}

.avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.member-header-info {
    flex: 1;
}

.member-name-large {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: white;
}

.member-title-large {
    font-size: 1.2rem;
    margin: 0 0 12px 0;
    opacity: 0.9;
    font-weight: 500;
}

.member-department-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.contributions-section,
.skills-section,
.member-todos-section {
    margin-bottom: 35px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    backdrop-filter: blur(10px);
}

/* Todo header and toggle button */
.todos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.toggle-completed-btn {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toggle-completed-btn:hover {
    background: var(--hover-color);
    color: var(--text-color);
    border-color: var(--primary-color);
}

.toggle-completed-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.toggle-completed-btn.active:hover {
    background: var(--primary-dark);
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.contributions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.contribution-pill {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
}

.contribution-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: var(--background-color);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.member-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
    padding: 30px 25px 20px 25px;
    border-top: 2px solid rgba(102, 126, 234, 0.15);
    background: rgba(102, 126, 234, 0.03);
    border-radius: 0 0 15px 15px;
}

.action-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.edit-btn {
    background: var(--primary-color);
    color: white;
}

.edit-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

.close-btn {
    background: var(--background-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.close-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-muted);
    transform: translateY(-1px);
}

/* Legacy styles for backwards compatibility */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.detail-item {
    background: var(--background-color);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.detail-label {
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.detail-value {
    color: var(--text-color);
    font-size: 1rem;
}

/* Status indicators */
.save-status {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1001;
    animation: slideInRight 0.3s ease-out;
    display: none;
}

.save-status.saving {
    background: var(--primary-color);
}

.save-status.saved {
    background: #10B981;
}

.save-status.error {
    background: #EF4444;
}

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

.connection-status {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1001;
}

.connection-status.connected {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.connection-status.disconnected {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

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

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

/* Search functionality */
input[type="text"][placeholder*="Search"] {
    transition: all 0.3s ease;
}

input[type="text"][placeholder*="Search"]:focus {
    width: 250px;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        justify-content: center;
    }
    
    .circle-container {
        width: 85vw;
        height: 85vw;
        max-width: 600px;
        max-height: 600px;
        margin: 5px auto 20px auto;
    }
    
    .org-chart {
        min-height: calc(100vh - 100px);
        padding: 10px;
    }
    
    .priorities-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        width: 100%;
        justify-content: center;
    }
}

/* Priority Detail Modal */
.priority-detail-modal {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.priority-detail-content {
    padding: 20px 0;
}

.priority-info {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.priority-title-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.priority-action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.delete-priority-btn {
    background: #EF4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.delete-priority-btn:hover {
    background: #DC2626;
    transform: translateY(-1px);
}

.priority-info h3 {
    color: var(--text-color);
    margin: 0;
    font-size: 1.5rem;
    flex: 1;
}

.edit-priority-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.edit-priority-btn:hover {
    background: var(--primary-color);
    color: white;
}

.priority-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    align-items: center;
}

.priority-urgency-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.priority-urgency-editor label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}

.urgency-select {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-color);
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
    min-width: 150px;
}

.urgency-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.urgency-badge,
.category-badge {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.urgency-badge.high {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.urgency-badge.medium {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.urgency-badge.low {
    background: rgba(34, 197, 94, 0.1);
    color: #059669;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.category-badge {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.assigned-members-section,
.todos-section {
    margin-bottom: 30px;
}

.assigned-members-section h4,
.todos-section h4 {
    color: var(--text-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.assigned-members-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    min-height: 40px;
    padding: 10px;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
}

.assigned-member-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.assigned-member-card .remove-assignment {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.todos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.todos-list {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.todo-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--surface-color);
    transition: background-color 0.2s ease;
}

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

.todo-item:hover {
    background: rgba(99, 102, 241, 0.05);
}

.todo-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.todo-checkbox.completed {
    background: #10b981;
    border-color: #10b981;
}

.todo-checkbox.completed::after {
    content: '✓';
    color: white;
    position: absolute;
    top: -2px;
    left: 2px;
    font-size: 12px;
    font-weight: bold;
}

.todo-content {
    flex: 1;
}

.todo-title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.todo-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.todo-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.todo-assigned-to {
    display: flex;
    align-items: center;
    gap: 5px;
}

.todo-due-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.todo-actions {
    display: flex;
    gap: 8px;
}

.todo-action-btn {
    background: none;
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: var(--text-muted);
}

.todo-action-btn:hover {
    background: var(--border-color);
    color: var(--text-color);
}

.empty-todos {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

/* Assign Member Modal */
.assign-member-content {
    padding: 20px 0;
}

.assign-member-content p {
    margin-bottom: 20px;
    color: var(--text-color);
    font-weight: 500;
}

.available-members-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
}

.available-member-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    border: 2px solid transparent;
}

.available-member-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.available-member-card:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.available-member-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 5px;
}

.available-member-title {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.available-member-department {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 10px;
    display: inline-block;
}

.no-available-members {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-style: italic;
}

/* Member Todos Section - moved to combined selector above */

.member-todos-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-color);
}

.member-todo-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: background-color 0.2s ease;
}

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

.member-todo-item:hover {
    background: rgba(99, 102, 241, 0.05);
}

.member-todo-item .todo-content {
    flex: 1;
}

.member-todo-item .todo-title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.member-todo-item .todo-description {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.member-todo-item .todo-due-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Completed todo styling */
.member-todo-item.completed {
    opacity: 0.7;
    background: rgba(34, 197, 94, 0.05);
}

.member-todo-item.completed .todo-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.member-todo-item.completed .todo-description {
    text-decoration: line-through;
    opacity: 0.7;
}

.member-todo-item.completed .todo-due-date {
    text-decoration: line-through;
    opacity: 0.7;
}

/* Todo checkbox styling */
.todo-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.todo-checkbox:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.todo-checkbox.completed {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.todo-checkbox.completed::after {
    content: '✓';
    font-size: 12px;
    font-weight: bold;
}

@media (max-width: 480px) {
    .futuristic-priority-circle {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 0.9rem;
        border: 1px solid white;
        box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
    }
    
    .priority-circle-title {
        font-size: 1rem;
    }
    
    .futuristic-contributor-circle {
        width: 30px;
        height: 30px;
        min-width: 30px;
    }
    
    .contributor-circle-avatar {
        width: 18px;
        height: 18px;
        font-size: 8px;
    }
    
    .contributor-circle-name {
        font-size: 6px;
    }
    
    /* Make priority containers more compact on mobile */
    .futuristic-priority-container {
        padding: 10px;
        gap: 8px;
        border-radius: 8px;
    }
    
    .priority-list-title {
        font-size: 0.95rem;
        line-height: 1.2;
        margin-bottom: 2px;
    }
    
    .priority-list-description {
        font-size: 0.75rem;
        line-height: 1.3;
        margin-bottom: 4px;
    }
    
    .priorities-grid {
        gap: 8px;
        padding: 10px 0;
    }
    
    /* Make priority meta info more compact */
    .priority-meta {
        gap: 8px;
        font-size: 0.7rem;
    }
    
    .urgency-badge {
        padding: 2px 6px;
        font-size: 0.65rem;
    }
    
    .category-badge {
        padding: 2px 6px;
        font-size: 0.65rem;
    }
}

/* Enhanced Mobile Responsive Design for Live Presentation */

/* Large Mobile Devices (768px and down) */
@media (max-width: 768px) {
    /* Container and Layout */
    .container {
        padding: 10px;
    }
    
    .controls {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
        padding: 15px 10px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
        min-width: auto;
    }
    
    /* Homepage Circle Layout - Mobile specific sizing */
    .circle-container {
        width: 100vw;
        height: 70vh;
        min-height: 500px;
        margin: 5px auto 20px auto;
        --mobile-scale: 0.7;
    }
    
    .community-center {
        width: calc(400px * var(--mobile-scale)) !important;
        height: calc(400px * var(--mobile-scale)) !important;
        font-size: calc(1.2rem * var(--mobile-scale));
    }
    
    .circular-card {
        /* Size will be calculated in JavaScript based on mobile scale */
    }
    
    .member-name {
        font-size: calc(0.9rem * var(--mobile-scale)) !important;
        line-height: 1.2;
    }
    
    /* Priorities Panel */
    .priorities-panel {
        padding: 20px 15px;
        margin: 10px;
    }
    
    .priorities-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .priorities-title h2 {
        font-size: 1.5rem;
        text-align: left;
    }
    
    .priority-add-btn {
        width: 100%;
        justify-content: center;
    }
    
    .priority-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .priority-filters {
        justify-content: center;
    }
    
    .filter-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .sort-select {
        width: 100%;
        padding: 10px;
    }
    
    /* Priority Circles */
    .futuristic-priority-circle {
        width: 45px !important;
        height: 45px !important;
        min-width: 45px !important;
        font-size: 1rem !important;
        border: 1px solid white;
    }
    
    .priority-circle-title {
        font-size: 1rem !important;
    }
    
    .priority-circle-category {
        font-size: 0.8rem !important;
    }
    
    .contributors-circle-container {
        justify-content: flex-start;
        gap: 6px;
        margin-left: auto;
    }
    
    .futuristic-contributor-circle {
        width: 32px !important;
        height: 70px !important;
    }
    
    /* Modal Styles */
    .modal-content {
        width: 95% !important;
        max-width: none !important;
        margin: 5% auto !important;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Member Detail Modal */
    .modern-member-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 20px;
    }
    
    .avatar-circle {
        width: 100px !important;
        height: 100px !important;
        font-size: 2.2rem;
        margin: 0 auto;
    }
    
    .member-name-large {
        font-size: 1.8rem !important;
        text-align: center;
    }
    
    .member-title-large {
        font-size: 1.1rem !important;
        text-align: center;
    }
    
    .contributions-section,
    .skills-section,
    .member-todos-section {
        padding: 20px 15px;
        margin-bottom: 25px;
    }
    
    .section-title {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .contribution-pill,
    .skill-tag {
        font-size: 0.8rem;
        padding: 6px 12px;
        margin: 4px;
    }
    
    .member-actions {
        flex-direction: column;
        gap: 12px;
        padding: 25px 20px;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
        padding: 14px;
        font-size: 1rem;
    }
    
    /* Priority Detail Modal */
    .priority-detail-modal {
        max-height: 95vh;
    }
    
    .priority-detail-content {
        padding: 15px 0;
    }
    
    .priority-info h3 {
        font-size: 1.3rem;
    }
    
    .priority-meta {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .urgency-badge,
    .category-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    
    .assigned-members-list {
        min-height: 60px;
        padding: 15px;
    }
    
    .assigned-member-card {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
    
    .todos-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .todo-item {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .todo-content {
        width: 100%;
    }
    
    .todo-meta {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .todo-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    /* Member Todos in Profile */
    .member-todo-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px;
    }
    
    .member-todos-list {
        max-height: 250px;
    }
    
    /* Form Styles */
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    input,
    textarea,
    select {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 12px;
    }
    
    .form-actions {
        flex-direction: column-reverse;
        gap: 12px;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        width: 100%;
        padding: 14px;
        font-size: 1rem;
        justify-content: center;
    }
}

/* Small Mobile Devices (480px and down) */
@media (max-width: 480px) {
    /* Tighter spacing for very small screens */
    .container {
        padding: 5px;
    }
    
    .circle-container {
        width: 80vw;
        height: 80vw;
        max-width: 500px;
        max-height: 500px;
        margin: 2px auto 15px auto;
    }
    
    .controls {
        padding: 10px 5px;
        gap: 5px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.75rem;
    }
    
    .btn i {
        font-size: 14px;
    }
    
    .priorities-panel {
        margin: 5px;
        padding: 15px 10px;
    }
    
    /* Smaller scale for tiny screens */
    .circle-container {
        --mobile-scale: 0.6;
        min-height: 450px;
    }
    
    .community-center {
        width: calc(400px * var(--mobile-scale)) !important;
        height: calc(400px * var(--mobile-scale)) !important;
        font-size: calc(1.2rem * var(--mobile-scale));
    }
    
    /* Priority circles and other elements will scale with the container */
    
    .modal-content {
        width: 98% !important;
        margin: 1% auto !important;
    }
    
    .contributions-section,
    .skills-section,
    .member-todos-section {
        padding: 15px 10px;
        margin-bottom: 20px;
    }
    
    .section-title {
        font-size: 1rem;
    }
}

/* Landscape Mobile Orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .circle-container {
        width: 60vh;
        height: 60vh;
        max-width: 500px;
        max-height: 500px;
    }
    
    .org-chart {
        min-height: calc(100vh - 80px);
    }
    
    .modal-content {
        max-height: 85vh;
    }
}

/* Large Desktop Screens */
@media (min-width: 1200px) {
    .circle-container {
        width: 70vw;
        height: 70vw;
        max-width: 1200px;
        max-height: 1200px;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .avatar-circle,
    .futuristic-priority-circle,
    .futuristic-contributor-circle {
        border-width: 2px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .filter-btn,
    .action-btn,
    .todo-action-btn {
        min-height: 44px; /* Apple's recommended touch target size */
        min-width: 44px;
    }
    
    .circular-card,
    .futuristic-priority-circle,
    .futuristic-contributor-circle {
        cursor: default; /* Remove cursor pointer on touch devices */
    }
    
    /* Enhanced touch feedback for mobile */
    .circular-card:active,
    .futuristic-priority-circle:active,
    .futuristic-contributor-circle:active {
        transform: scale(0.95);
        opacity: 0.8;
    }
    
    .btn:active,
    .action-btn:active {
        transform: scale(0.98);
    }
}

/* Accessibility improvements for presentation */
@media (prefers-reduced-motion: no-preference) {
    .circular-card,
    .futuristic-priority-circle,
    .btn,
    .action-btn {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}