/* main.css - Core Application Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #C9A961;
    --primary-dark: #A08550;
    --secondary: #2D3436;
    --accent: #00B894;
    --danger: #D63031;
    --light: #F8F9FA;
    --dark: #2D3436;
    --rose: #E91E63;
    --rose-dark: #C2185B;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    touch-action: pan-y;
}

/* Glass Morphism Effect */
.glass-morphism {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Canvas Wrapper */
.canvas-wrapper {
    background: white;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: inline-block;
    touch-action: none;
}

#designer-canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Loading Overlay */
.loading-overlay {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Template Selector */
.template-selector {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

.template-option {
    min-width: 120px;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    border: 2px solid transparent;
}

.template-option:hover,
.template-option:active {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.template-option.active {
    border-color: var(--primary);
    background: rgba(201, 169, 97, 0.1);
}

.template-preview {
    width: 100px;
    height: 100px;
    margin: 0 auto 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .control-btn span {
        display: none;
    }
    
    .control-btn svg {
        margin: 0 !important;
    }
    
    .template-selector {
        flex-wrap: nowrap;
        overflow-x: scroll;
    }
    
    .template-option {
        min-width: 100px;
    }
    
    .control-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 10px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 100;
    }
}