/* Custom styles complementing Tailwind */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #E8E6F0;
}

::-webkit-scrollbar-thumb {
    background: #7B6BB8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5B4B9F;
}

/* Canvas */
canvas {
    cursor: crosshair;
}

canvas.tool-move {
    cursor: move;
}

canvas.tool-scale {
    cursor: nwse-resize;
}

canvas.tool-rotate {
    cursor: grab;
}

canvas.tool-rotate:active {
    cursor: grabbing;
}

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

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.05);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.05);
    }
    56% {
        transform: scale(1);
    }
}

.animate-heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.5), 0 0 10px rgba(168, 85, 247, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.8), 0 0 30px rgba(168, 85, 247, 0.6);
    }
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Console output */
.console-line {
    margin-bottom: 2px;
    line-height: 1.4;
}

.console-line.success {
    color: #00FF00;
}

.console-line.error {
    color: #FF5555;
}

.console-line.warning {
    color: #FFFF00;
}

.console-line.info {
    color: #FFFFFF;
}

/* Modal backdrop */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Alpine.js x-show cloak helper */
[x-cloak] {
    display: none !important;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Feature placeholders */
.feature-tab.hidden {
    display: none;
}

.feature-tab.active {
    display: flex;
}

/* Transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Focus states */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #5B4B9F;
    ring: 2px;
    ring-color: rgba(91, 75, 159, 0.3);
}

/* Disabled states */
button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Print styles */
@media print {
    aside, .toolbar, .tabs {
        display: none;
    }
    
    canvas {
        max-width: 100%;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    aside {
        width: 100%;
        max-width: 300px;
    }
    
    .right-panel {
        display: none;
    }
}
