/* Mobile-first responsive design */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
}
html{
      background-color: #fafafa;
}
.loginPage {
    background: #fafafa;
}

.loginPage .nav-tabs .nav-item {
    width: 50%;
    margin: 0!important;
}
.loginPage .nav-tabs .nav-item a {
    border-radius: 0;
    text-align: center;
    padding: 1em!important;
}
img.logoLogin {
    max-height: 125px;
    margin: auto;
    display: block;
}
.loginPage .nav-tabs .nav-item a.active {
    background: #1988ff;
    color: #fff!important;
    margin: 0!important;
    border: none!important;
    height: 100%;
}
.loginPage .nav-tabs .nav-item a {
    border-radius: 0;
    text-align: center;
    padding: 1em!important;
    color: #222!important;
    background: #ddd;
    margin: 0;
    margin-top: 0;
}
.loginPage .nav-tabs li:first-child {
    border-top-left-radius: 5px!important;
        overflow: hidden;
}
.loginPage .nav-tabs li:last-child {
    border-top-right-radius: 5px!important;
        overflow: hidden;
}
.loginBox ul.nav.nav-tabs.card-header-tabs {
    margin: 0;
}
.loginBox .card-header {
    padding: 0!important;
    border-radius: 0!important;
}

#main-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: transparent!important;
    box-shadow: none;
}
.padding-menu {
    padding-top: 5em;
    background: #fafafa;
}
a.navbar-brand img {
    max-height: 50px;
}

li.nav-item a {
    background: #1988ff;
    margin: 5px;
    color: #fff!important;
    border-radius: 30px;
    padding: .2em 1em!important;
}
/* Mobile optimizations */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn-sm {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .card-text {
        font-size: 0.9rem;
    }
}

/* Card hover effects */
.card {
    transition: transform 0.2s ease-in-out;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Custom button styles */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

/* Alert positioning */
.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Posts styling */
.posts-list .card {
    border-left: 4px solid #007bff;
}

/* Responsive text */
@media (max-width: 576px) {
    h5 {
        font-size: 1.1rem;
    }
    
    h6 {
        font-size: 1rem;
    }
    
    .small {
        font-size: 0.8rem;
    }
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form improvements */
.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Navigation improvements */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Modal improvements */
.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

/* Tab improvements */
.nav-tabs .nav-link.active {
    color: #007bff;
    font-weight: 500;
}

/* Spacing utilities */
.mt-safe {
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .mt-safe {
        margin-top: 0.5rem;
    }
}

/* Timeline styles */
.timeline .card.border-primary {
    border-width: 2px !important;
}

.timeline .card.bg-light {
    background-color: #f8f9fa !important;
}

/* Unread badge styles */
.badge.bg-danger {
    font-size: 0.75em;
    vertical-align: top;
}

/* New post indicator */
.badge.bg-primary {
    font-size: 0.7em;
}

/* Card title with badges */
.card-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

/* Timeline specific styling */
.timeline .card {
    transition: all 0.3s ease;
}

.timeline .card:hover {
    transform: translateY(-1px);
}

/* Mobile timeline adjustments */
@media (max-width: 768px) {
    .timeline .card-body {
        padding: 1rem 0.75rem;
    }
    
    .timeline .card-title {
        font-size: 0.95rem;
    }
    
    .badge {
        font-size: 0.65em;
    }
}

/* Canvas Navigation System */
#main-content {
    position: relative;
    overflow: hidden;
    height: 100vh;
    cursor: grab;
    background: #fafafa;
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

#main-content.dragging {
    cursor: grabbing;
}

.canvas-container {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
    min-width: 100vw;
    min-height: calc(100vh - 120px);
    transform-origin: center center;
}

/* Category Circles */
.category-circle {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #0056b3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
    border: 4px solid rgba(255, 255, 255, 0.9);
    user-select: none;
    z-index: 2; /* Ensure circles are above lines */
}

.category-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(0, 123, 255, 0.4);
}

.category-circle .circle-content {
    padding: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Spot Circles */
.spot-circle {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.8);
    user-select: none;
    z-index: 99;
    background:rgba(0, 123, 255, 1);
}

.spot-circle.owner {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.spot-circle.member {
    background: linear-gradient(135deg, #17a2b8, #117a8b);
}

.spot-circle.pending {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #333;
}

.spot-circle.denied {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.spot-circle.private {
    background: linear-gradient(135deg, #6c757d, #495057);
}

.spot-circle:hover {
    transform: scale(1.15);
}

.spot-circle .circle-content {
    padding: 10px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Category Center Circle (for spot view) */
.category-center {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6f42c1, #5a32a3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 24px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(111, 66, 193, 0.4);
    border: 6px solid rgba(255, 255, 255, 0.9);
    z-index: 10;
    cursor: pointer;
}

.category-center:hover {
    transform: scale(1.05);
}

/* Navigation Controls */
.canvas-controls {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 123, 255, 0.9);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    font-size: 16px;
}

.control-btn:hover {
    background: rgba(0, 123, 255, 1);
    transform: scale(1.1);
    color: white;
}

/* Back Button */
.back-button {
    position: fixed;
    top: 5em;
    left: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(108, 117, 125, 0.9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
    z-index: 999;
    font-size: 20px;
}

.back-button:hover {
    background: rgba(108, 117, 125, 1);
    transform: scale(1.1); 
    color: white;
}

/* Fixed Action Buttons */
.fixed-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 998;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.action-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    font-size: 24px;
}

.action-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.6);
    color: white;
}

.action-btn:active {
    transform: scale(0.95);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .category-circle {
        width: 150px;
        height: 150px;
        font-size: 14px;
    }
    
    .spot-circle {
        width: 100px;
        height: 100px;
        font-size: 11px;
    }
    
    .category-center {
        width: 200px;
        height: 200px;
        font-size: 18px;
    }
    
    .canvas-controls {
        right: 10px;
        top: 70px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .back-button {
        width: 50px;
        height: 50px;
        top: 15px;
        left: 15px;
        font-size: 18px;
    }
    
    .fixed-actions {
        bottom: 20px;
        right: 20px;
    }
    
    .action-btn {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }
}

/* Zoom indicator */
.zoom-indicator {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zoom-indicator.show {
    opacity: 1;
}

/* Improved touch handling */
#main-content {
    position: relative;
    overflow: hidden;
    height: 100vh;
    cursor: grab;
    background: #fafafa;
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    touch-action: none; /* Prevent default touch behaviors */
}

/* Connection Lines */
.connection-lines {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
    overflow: visible !important;
}

.connection-line {
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Ensure SVG is properly sized */
svg.connection-lines {
    min-width: 3000px;
    min-height: 3000px;
}
