/**
 * Fastmap CSS
 * Additional styling for the mindmap application
 */

/* Smooth animations */
* {
    box-sizing: border-box;
}

/* Container */
#fastmap-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

/* Canvas cursor changes based on hover */
#fastmap-canvas:hover {
    cursor: pointer;
}

/* Input animations */
#word-input {
    transition: all 0.3s ease;
}

#word-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Toolbar animations */
.toolbar {
    animation: toolbarFadeIn 0.2s ease;
}

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

/* Button hover effects */
.toolbar button {
    position: relative;
    overflow: hidden;
}

.toolbar button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.toolbar button:active::before {
    width: 100%;
    height: 100%;
}

/* Color picker styling */
.toolbar input[type="color"] {
    transition: transform 0.2s;
}

.toolbar input[type="color"]:hover {
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #word-input {
        font-size: 18px;
        min-width: 250px;
        padding: 12px 24px;
    }

    #start-label {
        font-size: 16px;
    }

    .toolbar {
        padding: 6px;
        gap: 6px;
    }

    .toolbar button,
    .toolbar input[type="color"] {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}

/* Loading animation (optional, for future use) */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Accessibility */
.toolbar button:focus,
.toolbar input[type="color"]:focus {
    outline: 2px solid #4a9eff;
    outline-offset: 2px;
}

#word-input:focus {
    outline: none;
}

/* Dark mode support (already handled in inline styles, but here for completeness) */
@media (prefers-color-scheme: dark) {
    /* Already using dark theme by default */
}

/* Print styles */
@media print {
    #input-container,
    .toolbar {
        display: none !important;
    }
}
