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

body {
    font-family: 'Arial', sans-serif;
    background: radial-gradient(ellipse at center, #1a1a3a 0%, #0a0a1a 100%);
    color: white;
    overflow: hidden;
    cursor: text;
}

#container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    background: transparent;
    z-index: 1;
}

#controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: rgba(20, 20, 60, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 300px;
}

.control-panel h1 {
    font-size: 1.5em;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ff6600, #ff0066, #6600ff);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    text-align: center;
}

.control-panel p {
    font-size: 0.9em;
    margin-bottom: 15px;
    color: #cccccc;
    text-align: center;
}

.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #dddddd;
}

#intensity {
    width: 100%;
    margin-bottom: 5px;
}

#intensity-label {
    font-size: 0.8em;
    color: #aaaaaa;
}

.control-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

button {
    flex: 1;
    padding: 8px 12px;
    background: linear-gradient(45deg, #4a4aaa, #6a6acc);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 0.85em;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(106, 106, 204, 0.4);
}

button:active {
    transform: translateY(0);
}

#clear-btn {
    background: linear-gradient(45deg, #ff4444, #ff6666);
}

#clear-btn:hover {
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.4);
}

#word-preview {
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#current-word {
    font-size: 1.2em;
    font-weight: bold;
    color: #ffffff;
}

#effect-hint {
    font-size: 0.8em;
    color: #88ccff;
    margin-top: 5px;
}

#typing-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

footer {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 100;
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.6);
}

footer a {
    color: #88ccff;
    text-decoration: none;
}

footer a:hover {
    color: #aaddff;
}

/* Responsive design */
@media (max-width: 768px) {
    #controls {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        padding: 15px;
    }
    
    .control-panel h1 {
        font-size: 1.3em;
    }
    
    .control-buttons {
        flex-direction: column;
    }
    
    footer {
        bottom: 10px;
        left: 10px;
        font-size: 0.7em;
    }
}

/* Custom scrollbar for controls */
.control-panel::-webkit-scrollbar {
    width: 6px;
}

.control-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.control-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.control-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Magic animations */
@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
}

.sparkle {
    animation: sparkle 1s ease-in-out infinite;
}

/* Cursor styling */
#cursor {
    position: absolute;
    width: 2px;
    height: 35px;
    background: white;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}