:root {
    --primary: #00f3ff;
    --secondary: #bc13fe;
    --bg: #050914;
    --glass: rgba(10, 20, 40, 0.75);
    --border: rgba(0, 243, 255, 0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; }

body {
    background-color: var(--bg);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 243, 255, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(188, 19, 254, 0.08), transparent 25%),
        linear-gradient(rgba(0,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,255,255,0.03) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 30px 30px, 30px 30px;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    overflow: hidden;
    height: 100vh; width: 100vw;
}

/* --- LOGO & HEADER --- */
.global-header {
    position: fixed; top: 20px; left: 30px; z-index: 1000;
    display: flex; align-items: center; gap: 20px; pointer-events: none;
}
.logo-container { animation: float 4s ease-in-out infinite; }
@keyframes float { 
    0%, 100% { transform: translateY(0); } 
    50% { transform: translateY(-8px); filter: drop-shadow(0 0 10px var(--primary)); } 
}
.logo-title {
    font-family: 'Orbitron', sans-serif; font-size: 3rem; font-weight: 900;
    letter-spacing: 4px; background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0,243,255,0.4); position: relative;
}
.logo-sub {
    font-family: 'Orbitron', sans-serif; font-size: 0.75rem;
    letter-spacing: 8.5px; color: #888; text-transform: uppercase; margin-top: -5px;
}
.header-punchline {
    font-family: 'Orbitron', sans-serif; font-size: 1.2rem;
    color: var(--primary); border-left: 2px solid var(--secondary);
    padding-left: 15px; opacity: 0.8; text-transform: uppercase;
}

/* --- FOOTER --- */
.global-footer {
    position: fixed; bottom: 20px; width: 100%;
    display: flex; flex-direction: column; align-items: center; z-index: 1000; gap: 10px;
}
.social-bar {
    display: flex; gap: 15px; background: var(--glass);
    border: 1px solid var(--border); padding: 10px 25px;
    border-radius: 30px; backdrop-filter: blur(10px);
}
.social-bar a {
    color: #fff; text-decoration: none; font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem; text-transform: uppercase; transition: all 0.3s;
    cursor: pointer; pointer-events: auto;
}
.social-bar a:hover { color: var(--primary); text-shadow: 0 0 10px var(--primary); transform: scale(1.1); }

/* --- SCREENS --- */
.screen {
    position: absolute; top: 0; left: 0; width: 100vw; height: 100vh;
    display: none; opacity: 0; transition: opacity 0.5s ease;
}
.screen.active { display: flex; opacity: 1; }

#home-screen { flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.welcome-text { font-family: 'Orbitron', sans-serif; font-size: 2rem; color: #fff; margin-bottom: 10px; text-shadow: 0 0 10px rgba(255,255,255,0.5); }

.epic-btn {
    margin-top: 50px; padding: 25px 60px; font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem; font-weight: 900; color: #fff;
    background: linear-gradient(45deg, rgba(0,243,255,0.1), rgba(188,19,254,0.1));
    border: 2px solid var(--primary); border-radius: 15px; cursor: pointer;
    position: relative; overflow: hidden; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2), inset 0 0 20px rgba(188, 19, 254, 0.2);
    backdrop-filter: blur(5px);
}
.epic-btn::before {
    content: ''; position: absolute; top: -50%; left: -50%;
    width: 200%; height: 200%; background: radial-gradient(circle, rgba(0,243,255,0.4) 0%, transparent 60%);
    transform: scale(0); transition: transform 0.6s ease-out; pointer-events: none;
}
.epic-btn:hover {
    transform: scale(1.05); box-shadow: 0 0 40px rgba(0, 243, 255, 0.6), inset 0 0 30px rgba(188, 19, 254, 0.6);
    border-color: var(--secondary); text-shadow: 0 0 10px #fff;
}
.epic-btn:hover::before { transform: scale(1); animation: swirl 4s linear infinite; }
.epic-btn:active { transform: scale(0.9) skewX(-5deg); background: rgba(0, 243, 255, 0.3); }
@keyframes swirl { 100% { transform: scale(1) rotate(360deg); } }

/* --- CREATION LAYOUT --- */
#creation-screen { background: rgba(0,0,0,0.85); backdrop-filter: blur(15px); z-index: 50; }
.close-btn { position: absolute; top: 30px; right: 40px; font-family: 'Orbitron', sans-serif; font-size: 2rem; color: var(--primary); cursor: pointer; z-index: 100; transition: 0.3s; }
.close-btn:hover { color: red; transform: rotate(90deg) scale(1.2); }

.creation-layout { display: flex; width: 100%; height: 100%; padding-top: 100px; padding-bottom: 120px; }
.left-panel { width: 50%; height: 100%; overflow-y: auto; padding: 0 40px; border-right: 1px solid var(--border); padding-bottom: 100px; }
.left-panel::-webkit-scrollbar { width: 8px; }
.left-panel::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
.left-panel::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
.right-panel { width: 50%; height: 50%; position: relative; }
#canvas-container { width: 100%; height: 100%; position: relative; }

/* VIEWER CONTROLS */
.viewer-controls {
    position: absolute; top: 20px; right: 20px; display: flex; gap: 15px; z-index: 10;
}
.theme-orb, .spin-orb {
    width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--primary);
    cursor: pointer; box-shadow: 0 0 10px var(--primary); transition: 0.3s;
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
    color: var(--primary); font-family: 'Orbitron', sans-serif;
}
.theme-orb { background: #050914; }
.theme-orb.night-mode { background: #ffffff; box-shadow: 0 0 15px #fff; border-color: #fff; }
.spin-orb { background: rgba(0,0,0,0.6); }
.spin-orb:hover, .theme-orb:hover { transform: scale(1.2); box-shadow: 0 0 20px var(--secondary); border-color: var(--secondary); color: var(--secondary); }
.spin-orb.stopped { color: #ff4444; border-color: #ff4444; box-shadow: 0 0 10px #ff4444; }

.step-block { background: var(--glass); border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 20px; position: relative; }
.step-block::before {
    content: attr(data-step); position: absolute; top: -10px; left: -10px;
    background: var(--bg); border: 1px solid var(--primary); color: var(--primary);
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    font-family: 'Orbitron', sans-serif; font-weight: bold; border-radius: 50%;
}
.step-title { font-family: 'Orbitron', sans-serif; color: var(--secondary); margin-bottom: 15px; font-size: 1.2rem; text-transform: uppercase; }

select, input[type="text"] {
    width: 100%; background: rgba(0, 243, 255, 0.1); border: 1px solid var(--primary);
    color: #fff; padding: 10px; font-family: 'Rajdhani', sans-serif; font-size: 1.1rem;
    border-radius: 5px; outline: none; margin-bottom: 10px; transition: 0.2s;
}
select:focus, input[type="text"]:focus { transform: scaleX(1.02); box-shadow: 0 0 15px rgba(0,243,255,0.4); }

input[type="range"] {
    -webkit-appearance: none; width: 100%; height: 12px; background: rgba(0,0,0,0.5);
    border: 1px solid var(--border); border-radius: 6px; outline: none; margin: 10px 0;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 20px; height: 24px;
    background: linear-gradient(to bottom, var(--primary), #0088ff); border: 2px solid #fff;
    border-radius: 4px; cursor: pointer; box-shadow: 0 0 10px var(--primary); transition: transform 0.1s;
}
input[type="range"]::-webkit-slider-thumb:active { transform: scale(0.8) translateY(2px); }

.checkbox-wrapper { display: flex; align-items: center; gap: 10px; margin-top: 10px; cursor: pointer; }
.squishy-cb {
    appearance: none; width: 24px; height: 24px; background: rgba(0,0,0,0.5);
    border: 2px solid var(--primary); border-radius: 6px; position: relative;
    cursor: pointer; transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.squishy-cb:checked { background: var(--primary); transform: scale(1.1) rotate(10deg); }

.setting-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;}
.val-display { color: var(--primary); font-family: 'Orbitron', sans-serif; font-weight: bold;}
.sub-text { font-size: 0.8rem; color: #888; margin-bottom: 10px; }

/* Dynamic List Items & Buttons */
.add-btn {
    background: var(--primary); color: #000; border: none; padding: 8px 15px;
    font-family: 'Orbitron', sans-serif; font-weight: bold; border-radius: 5px;
    cursor: pointer; font-size: 0.8rem; transition: 0.3s; width: 100%; margin-top: 5px;
}
.add-btn:hover { background: #fff; box-shadow: 0 0 15px var(--primary); }
.add-btn:disabled { background: #444; color: #888; cursor: not-allowed; box-shadow: none; }

.item-list { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px; }
.item-row { 
    display: flex; justify-content: space-between; align-items: center; 
    background: rgba(255,255,255,0.05); padding: 8px 10px; border-radius: 4px; 
    margin-bottom: 5px; font-size: 0.9rem; border: 1px solid transparent; cursor: pointer; transition: 0.2s;
}
.item-row:hover { background: rgba(0, 243, 255, 0.1); border-color: var(--primary); }
.item-row.selected { background: rgba(188, 19, 254, 0.2); border-color: var(--secondary); }
.remove-btn { color: #ff4444; cursor: pointer; font-weight: bold; padding: 2px 5px; }
.remove-btn:hover { background: rgba(255,0,0,0.2); border-radius: 3px; }

.editor-panel { background: rgba(0,0,0,0.5); padding: 15px; border-radius: 5px; border-left: 2px solid var(--secondary); margin-top: 10px; }

/* Finalize Button */
.buy-btn-container { position: absolute; bottom: 20px; left: 40px; width: calc(50% - 80px); z-index: 100; }
.finalize-btn {
    width: 100%; padding: 20px; background: linear-gradient(90deg, #00ff66, #00d2ff);
    border: none; border-radius: 10px; color: #000; font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem; font-weight: 900; cursor: pointer; text-shadow: 0 0 5px rgba(255,255,255,0.5);
    transition: 0.2s;
}
.finalize-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0, 255, 102, 0.4); }
.finalize-btn:active { transform: translateY(2px) scale(0.98); }

/* --- CHECKOUT --- */
#checkout-screen { background: rgba(5, 9, 20, 0.98); z-index: 200; display: none; flex-direction: column; align-items: center; padding-top: 80px; }
.success-text { color: #00ff66; font-family: 'Orbitron', sans-serif; font-size: 3rem; font-weight: 900; margin-bottom: 20px; text-shadow: 0 0 20px rgba(0, 255, 102, 0.5); }
.receipt-container { display: flex; gap: 40px; width: 90%; max-width: 1400px; height: 60vh; }
.receipt-text { flex: 1; background: var(--glass); border: 1px solid #00ff66; padding: 20px; border-radius: 10px; overflow-y: auto; font-family: 'Rajdhani'; color: #ccc; font-size: 1.1rem;}
.receipt-text span { color: #fff; font-weight: bold; }

.gallery { flex: 1.5; position: relative; background: #000; border: 2px solid var(--primary); border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 30px rgba(0,243,255,0.2); }
.gallery-img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5)); transition: opacity 0.3s; }

.gallery-arrows { position: absolute; width: 100%; display: flex; justify-content: space-between; padding: 0 20px; pointer-events: none; z-index: 10; }
.arrow { pointer-events: auto; background: rgba(0,0,0,0.6); border: 1px solid var(--primary); color: var(--primary); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'Orbitron'; font-size: 1.5rem; cursor: pointer; transition: 0.2s; }
.arrow:hover { background: var(--primary); color: #000; }
.gallery-counter { position: absolute; bottom: 10px; font-family: 'Orbitron'; color: var(--primary); background: rgba(0,0,0,0.5); padding: 5px 15px; border-radius: 20px; border: 1px solid var(--primary); z-index: 10; }

.loop-btn { margin-top: 30px; background: transparent; border: 2px solid var(--secondary); color: var(--secondary); padding: 15px 40px; font-family: 'Orbitron', sans-serif; font-size: 1.2rem; border-radius: 30px; cursor: pointer; transition: 0.3s; }
.loop-btn:hover { background: var(--secondary); color: #fff; box-shadow: 0 0 20px var(--secondary); }