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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #ffffff;
    overflow-x: hidden;
}

.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem;
    text-align: center;
    border-bottom: 2px solid #00ffff;
    box-shadow: 0 2px 10px rgba(0, 255, 255, 0.3);
}

header h1 {
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff, 0 0 30px #00ffff;
    color: #00ffff;
    letter-spacing: 2px;
    animation: glow 2s ease-in-out infinite;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.controls-panel {
    width: 300px;
    background: rgba(0, 0, 0, 0.9);
    padding: 2rem;
    overflow-y: auto;
    border-right: 2px solid #00ffff;
    box-shadow: 2px 0 10px rgba(0, 255, 255, 0.2);
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #00ffff;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.control-group input[type="text"] {
    width: 100%;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #00ffff;
    border-radius: 5px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.control-group input[type="text"]:focus {
    outline: none;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    border-color: #ffffff;
}

.control-group select {
    width: 100%;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #00ffff;
    border-radius: 5px;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-group select:focus {
    outline: none;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    border-color: #ffffff;
}

.control-group input[type="color"] {
    width: 100%;
    height: 50px;
    background: transparent;
    border: 2px solid #00ffff;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-group input[type="color"]:hover {
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.control-group input[type="range"] {
    width: 70%;
    -webkit-appearance: none;
    height: 8px;
    background: linear-gradient(to right, #00ffff, #ffffff);
    outline: none;
    border-radius: 5px;
    margin-right: 10px;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #00ffff;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #ffffff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.slider-value {
    display: inline-block;
    min-width: 30px;
    color: #00ffff;
    font-weight: bold;
}

.control-group input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.5);
    accent-color: #00ffff;
}

.control-group button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #00ffff, #0080ff);
    border: none;
    border-radius: 5px;
    color: #000000;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.control-group button:hover {
    background: linear-gradient(45deg, #ffffff, #00ffff);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.4);
    transform: translateY(-2px);
}

.canvas-container {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

.neon-display-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    perspective: 1000px;
    overflow: hidden;
}

.neon-text {
    font-family: 'Tilt Neon', cursive;
    font-size: 60px;
    font-weight: 400;
    color: #00ffff;
    text-align: center;
    letter-spacing: 2px;
    white-space: nowrap;
    user-select: none;
    cursor: grab;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    
    /* Neon glow effect */
    text-shadow: 
        0 0 5px currentColor,
        0 0 10px currentColor,
        0 0 20px currentColor,
        0 0 40px currentColor,
        0 0 80px currentColor;
    
    /* Text stroke effect */
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
}

.neon-text:active {
    cursor: grabbing;
}

/* Glow animation */
.neon-text.glow-animation {
    animation: neonGlow 2s ease-in-out infinite alternate;
}

@keyframes neonGlow {
    from {
        text-shadow: 
            0 0 5px currentColor,
            0 0 10px currentColor,
            0 0 20px currentColor,
            0 0 40px currentColor,
            0 0 80px currentColor;
    }
    to {
        text-shadow: 
            0 0 10px currentColor,
            0 0 20px currentColor,
            0 0 30px currentColor,
            0 0 60px currentColor,
            0 0 100px currentColor;
    }
}

.instructions {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    border-radius: 20px;
    border: 1px solid #00ffff;
    text-align: center;
}

.instructions p {
    margin: 0;
    font-size: 0.8rem;
    color: #00ffff;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile */
    }
    
    .main-content {
        flex-direction: column;
        overflow: hidden;
    }
    
    .controls-panel {
        width: 100%;
        max-height: 45vh;
        padding: 0.75rem;
        border-right: none;
        border-bottom: 2px solid #00ffff;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .control-group {
        margin-bottom: 0.75rem;
    }
    
    .control-group label {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }
    
    .control-group input[type="text"],
    .control-group select {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .control-group input[type="range"] {
        width: 65%;
    }
    
    .pricing-section {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }
    
    .pricing-section h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .order-button,
    .payment-button {
        padding: 12px;
        font-size: 1rem;
    }
    
    header {
        padding: 0.75rem;
    }
    
    header h1 {
        font-size: 1.3rem;
        letter-spacing: 1px;
    }
    
    .canvas-container {
        flex: 1;
        min-height: 50vh;
    }
    
    .neon-display-container {
        min-height: 200px;
        touch-action: none; /* Prevent default touch behaviors */
    }
    
    .neon-text {
        font-size: 32px;
        letter-spacing: 1px;
        /* Ensure text stays readable on small screens */
        max-width: 90vw;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .instructions {
        position: static;
        transform: none;
        margin: 10px;
        padding: 8px 16px;
        font-size: 0.7rem;
    }
    
    .instructions p {
        margin: 0;
        text-align: center;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .controls-panel {
        max-height: 50vh;
        padding: 0.5rem;
    }
    
    .control-group {
        margin-bottom: 0.5rem;
    }
    
    .control-group label {
        font-size: 0.75rem;
    }
    
    .control-group input[type="text"],
    .control-group select {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    .neon-text {
        font-size: 28px;
    }
    
    header h1 {
        font-size: 1.1rem;
    }
    
    .pricing-section h3 {
        font-size: 0.9rem;
    }
    
    .total-price {
        font-size: 1.3rem;
    }
    
    /* Modal improvements for mobile */
    .modal-content {
        margin: 5% auto;
        padding: 1rem;
        width: 95%;
        max-height: 95vh;
        border-radius: 10px;
    }
    
    .close {
        font-size: 24px;
    }
    
    .modal h2 {
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }
    
    .modal h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .order-summary {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .design-preview canvas {
        max-width: 100%;
        height: auto;
    }
    
    .form-group {
        margin-bottom: 0.75rem;
    }
    
    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    #card-element {
        padding: 0.75rem;
    }
}

/* Scrollbar styling */
.controls-panel::-webkit-scrollbar {
    width: 8px;
}

.controls-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.controls-panel::-webkit-scrollbar-thumb {
    background: #00ffff;
    border-radius: 4px;
}

.controls-panel::-webkit-scrollbar-thumb:hover {
    background: #ffffff;
}

/* Manufacturable neon font enhancements */
.neon-text[style*="Tilt Neon"] {
    font-weight: 400;
    letter-spacing: 2px;
    /* Google's official neon font - designed for 3D neon effects */
}

.neon-text[style*="Quicksand"] {
    font-weight: 500;
    letter-spacing: 1px;
    /* Smooth rounded geometric - perfect for curved glass tubes */
}

.neon-text[style*="Nunito Sans"] {
    font-weight: 500;
    letter-spacing: 1px;
    /* Clean curves ideal for neon manufacturing */
}

.neon-text[style*="DM Sans"] {
    font-weight: 500;
    letter-spacing: 1px;
    /* Low contrast geometric - easy to bend in glass */
}

.neon-text[style*="Montserrat"] {
    font-weight: 500;
    letter-spacing: 2px;
    /* Classic geometric - inspired by 1930s posters */
}

.neon-text[style*="Albert Sans"] {
    font-weight: 500;
    letter-spacing: 1px;
    /* Scandinavian geometric - clean minimal lines */
}

.neon-text[style*="Plus Jakarta Sans"] {
    font-weight: 500;
    letter-spacing: 1px;
    /* Sharp curves - modern geometric aesthetic */
}

.neon-text[style*="Roboto"] {
    font-weight: 400;
    letter-spacing: 1px;
    /* Mechanical precision - perfect for technical neon signs */
}

.neon-text[style*="Lato"] {
    font-weight: 400;
    letter-spacing: 1px;
    /* Humanist geometric - friendly curves */
}

.neon-text[style*="Exo 2"] {
    font-weight: 500;
    letter-spacing: 1px;
    /* Contemporary tech aesthetic */
}

/* Select dropdown styling improvements */
.control-group select optgroup {
    background: rgba(0, 0, 0, 0.9);
    color: #00ffff;
    font-weight: bold;
    font-style: normal;
    padding: 5px;
}

.control-group select option {
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 8px;
    font-style: normal;
}

.control-group select option:hover {
    background: rgba(0, 255, 255, 0.2);
}

/* Pricing section styling */
.pricing-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #00ffff;
}

.pricing-section h3 {
    color: #00ffff;
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.price-display {
    text-align: center;
    margin: 1.5rem 0;
}

.total-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
}

.order-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #00ffff, #0080ff);
    border: none;
    border-radius: 8px;
    color: #000000;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.order-button:hover {
    background: linear-gradient(45deg, #ffffff, #00ffff);
    box-shadow: 0 5px 25px rgba(0, 255, 255, 0.6);
    transform: translateY(-2px);
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    margin: 2% auto;
    padding: 2rem;
    border: 2px solid #00ffff;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.3);
}

.close {
    color: #00ffff;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #ffffff;
}

.modal h2, .modal h3 {
    color: #00ffff;
    text-align: center;
    margin-bottom: 1rem;
}

.order-summary {
    background: rgba(0, 0, 0, 0.5);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #00ffff;
    margin-bottom: 2rem;
}

.design-preview {
    text-align: center;
    margin-bottom: 1rem;
}

.design-preview canvas {
    border: 1px solid #00ffff;
    border-radius: 5px;
    background: #000000;
}

.order-details p {
    color: #ffffff;
    margin: 0.5rem 0;
}

.order-total {
    font-size: 1.2rem;
    color: #00ffff !important;
    text-shadow: 0 0 10px #00ffff;
    text-align: center;
    margin-top: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    color: #00ffff;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #00ffff;
    border-radius: 5px;
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    border-color: #ffffff;
}

.form-group textarea {
    min-height: 60px;
    resize: vertical;
}

#card-element {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #00ffff;
    border-radius: 5px;
    padding: 1rem;
    margin: 1rem 0;
}

#card-errors {
    color: #ff6b6b;
    margin: 0.5rem 0;
    font-weight: bold;
}

.payment-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #00ff00, #008800);
    border: none;
    border-radius: 8px;
    color: #000000;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.payment-button:hover {
    background: linear-gradient(45deg, #ffffff, #00ff00);
    box-shadow: 0 5px 25px rgba(0, 255, 0, 0.4);
    transform: translateY(-2px);
}

.payment-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Header glow animation */
@keyframes glow {
    0% { text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff, 0 0 30px #00ffff; }
    50% { text-shadow: 0 0 20px #00ffff, 0 0 30px #00ffff, 0 0 40px #00ffff; }
    100% { text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff, 0 0 30px #00ffff; }
}