/* Custom styles for the Constellation Map */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Canvas container */
#canvasContainer {
    position: relative;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    background-attachment: fixed;
}

/* Floating toolbar animations */
.fixed button {
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fixed button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Color option buttons */
.color-option, .edit-color-option {
    transition: all 0.2s ease;
    cursor: pointer;
}

.color-option:hover, .edit-color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.color-option.selected, .edit-color-option.selected {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

/* Modal animations */
#addStarModal, #editStarModal {
    animation: fadeIn 0.3s ease-out;
}

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

/* Status indicator */
#statusIndicator {
    animation: slideIn 0.3s ease-out;
}

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

/* Custom scrollbar for textareas */
textarea::-webkit-scrollbar {
    width: 6px;
}

textarea::-webkit-scrollbar-track {
    background: #374151;
    border-radius: 3px;
}

textarea::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 3px;
}

textarea::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Input focus styles */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Konva canvas styling */
.konvajs-content {
    border-radius: 0;
}

/* Tooltip styling */
.konva-tooltip {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    pointer-events: none;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Connect mode indicator */
.connect-mode-active {
    background: #10b981 !important;
    animation: pulse 2s infinite;
}

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

/* Star glow effect */
.star-glow {
    filter: drop-shadow(0 0 10px currentColor);
}

/* Responsive design */
@media (max-width: 768px) {
    .fixed {
        position: fixed;
        top: 10px;
        left: 10px;
        right: 10px;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .fixed button {
        flex: 1;
        min-width: 0;
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .fixed button span:last-child {
        display: none;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Detailed View Modal */
#detailedViewModal {
    animation: fadeIn 0.3s ease-out;
}

#detailedViewModal .max-h-\[90vh\] {
    max-height: 90vh;
}

/* File list styling */
#fileList {
    border: 1px solid #374151;
    border-radius: 6px;
    padding: 8px;
}

#fileList::-webkit-scrollbar {
    width: 6px;
}

#fileList::-webkit-scrollbar-track {
    background: #374151;
    border-radius: 3px;
}

#fileList::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 3px;
}

#fileList::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Constellation selector */
#constellationSelector {
    animation: slideDown 0.3s ease-out;
}

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

/* Disabled button styling */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Orbital path animation */
.orbital-path {
    animation: orbitalPulse 3s infinite;
}

@keyframes orbitalPulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

/* File upload styling */
input[type="file"] {
    cursor: pointer;
}

input[type="file"]::-webkit-file-upload-button {
    background: #4b5563;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 8px;
}

input[type="file"]::-webkit-file-upload-button:hover {
    background: #6b7280;
}

/* Tag input styling */
#detailedTags {
    background: linear-gradient(90deg, transparent 0%, transparent 100%);
    background-size: 100% 2px;
    background-position: bottom;
    background-repeat: no-repeat;
    border: none;
    border-bottom: 2px solid #4b5563;
    border-radius: 0;
}

#detailedTags:focus {
    border-bottom-color: #3b82f6;
    background-size: 100% 2px;
}

/* Priority and status indicators */
.priority-low { color: #10b981; }
.priority-medium { color: #f59e0b; }
.priority-high { color: #ef4444; }
.priority-critical { color: #dc2626; font-weight: bold; }

.status-idea { color: #8b5cf6; }
.status-planning { color: #3b82f6; }
.status-in-progress { color: #f59e0b; }
.status-completed { color: #10b981; }
.status-on-hold { color: #6b7280; }

/* Mode indicator */
#modeIndicator {
    animation: slideUp 0.3s ease-out;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

/* Selection feedback */
.selected-constellation {
    stroke: #06b6d4 !important;
    stroke-width: 4 !important;
    animation: selectionPulse 1s infinite;
}

.selected-star {
    stroke: #06b6d4 !important;
    stroke-width: 3 !important;
    animation: selectionPulse 1s infinite;
}

@keyframes selectionPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Background selection buttons */
/* #darkBgBtn, #lightBgBtn {
    transition: all 0.2s ease;
}

#darkBgBtn:hover, #lightBgBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#darkBgBtn.ring-2, #lightBgBtn.ring-2 {
    box-shadow: 0 0 0 2px #3b82f6;
} */

/* Light background adjustments */
/* .light-bg {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
}

.light-bg .text-white {
    color: #1e293b !important;
}

.light-bg .bg-slate-800 {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
}

.light-bg .bg-slate-700 {
    background-color: #e2e8f0 !important;
    color: #1e293b !important;
}

.light-bg .border-slate-600 {
    border-color: #94a3b8 !important;
} */

/* Ensure background changes work properly */
body {
    transition: background 0.3s ease;
}

#canvasContainer {
    transition: background 0.3s ease;
}

/* Highlighting animations */
.highlight-constellation {
    animation: constellationPulse 1.5s infinite;
}

.highlight-star {
    animation: starPulse 1.5s infinite;
}

@keyframes constellationPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes starPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Trash Bin Modal */
#trashBinModal {
    animation: fadeIn 0.3s ease-out;
}

#trashBinModal .max-h-\[80vh\] {
    max-height: 80vh;
}

/* Trash item styling */
.trash-item {
    transition: all 0.2s ease;
}

.trash-item:hover {
    background-color: #374151;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Trash bin buttons */
.restore-item, .permanent-delete {
    transition: all 0.2s ease;
}

.restore-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.permanent-delete:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Trash bin indicator */
#trashBinBtn {
    position: relative;
}

#trashBinBtn::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#trashBinBtn.has-items::after {
    opacity: 1;
}
