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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1400px;
}

.screen {
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 3em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

h2 {
    font-size: 2em;
    color: #333;
    margin-bottom: 10px;
}

h3 {
    font-size: 1.3em;
    color: #555;
    margin-bottom: 15px;
}

h4 {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    color: #666;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-large {
    padding: 20px 60px;
    font-size: 1.3em;
    margin-top: 20px;
}

/* Create Screen Layout */
.create-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Puppet Preview */
.puppet-preview {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 40px;
    min-height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.puppet-display {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.puppet-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Puppet Head */
.puppet-head {
    width: 150px;
    height: 150px;
    background: #FFD700;
    border-radius: 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.puppet-head.square {
    border-radius: 20px;
}

.puppet-head.triangle {
    width: 0;
    height: 0;
    border-left: 75px solid transparent;
    border-right: 75px solid transparent;
    border-bottom: 150px solid #FFD700;
    border-radius: 10px;
    background: transparent;
}

.puppet-head.star {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    border-radius: 0;
}

/* Eyes */
.eyes {
    display: flex;
    gap: 30px;
    margin-bottom: 10px;
}

.eye {
    width: 25px;
    height: 25px;
    background: white;
    border-radius: 50%;
    border: 3px solid #333;
    position: relative;
    animation: blink 4s infinite;
}

.pupil {
    width: 12px;
    height: 12px;
    background: #333;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: lookAround 3s infinite;
}

@keyframes blink {
    0%, 96%, 100% {
        height: 25px;
    }
    98% {
        height: 3px;
    }
}

@keyframes lookAround {
    0%, 100% {
        left: 50%;
    }
    25% {
        left: 60%;
    }
    75% {
        left: 40%;
    }
}

/* Mouth */
.mouth {
    font-size: 40px;
    position: absolute;
    bottom: 20px;
}

/* Accessories */
.accessories {
    position: absolute;
    top: -30px;
    font-size: 50px;
}

/* Body */
.puppet-body {
    width: 120px;
    height: 140px;
    background: #667eea;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.arms {
    position: absolute;
    width: 100%;
    top: 20px;
}

.arm {
    width: 60px;
    height: 15px;
    background: #667eea;
    border-radius: 10px;
    position: absolute;
    transition: all 0.3s ease;
}

.arm.left {
    left: -50px;
    transform-origin: right center;
}

.arm.right {
    right: -50px;
    transform-origin: left center;
}

.hand {
    position: absolute;
    font-size: 25px;
    top: -10px;
}

.arm.left .hand {
    left: -20px;
}

.arm.right .hand {
    right: -20px;
}

/* Legs */
.puppet-legs {
    display: flex;
    gap: 20px;
}

.leg {
    width: 20px;
    height: 80px;
    background: #667eea;
    border-radius: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.foot {
    position: absolute;
    bottom: -15px;
    left: -10px;
    font-size: 25px;
}

/* Customization Panel */
.customization-panel {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.customization-panel::-webkit-scrollbar {
    width: 8px;
}

.customization-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.customization-panel::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.custom-section {
    margin-bottom: 30px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.option-btn {
    background: white;
    border: 3px solid #667eea;
    padding: 15px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    font-weight: bold;
}

.option-btn:hover, .option-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.color-btn {
    width: 100%;
    height: 50px;
    border: 3px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-btn:hover, .color-btn.active {
    border-color: #333;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.name-input {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    border: 3px solid #667eea;
    border-radius: 15px;
    outline: none;
    transition: all 0.3s ease;
}

.name-input:focus {
    border-color: #764ba2;
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.3);
}

/* Play Screen */
.play-area {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    min-height: 600px;
}

.play-puppet-container {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

.play-puppet-container.stage {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.play-puppet-container.park {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
}

.play-puppet-container.space {
    background: linear-gradient(135deg, #000428 0%, #004e92 100%);
}

.play-puppet-container.beach {
    background: linear-gradient(135deg, #f7b733 0%, #fc4a1a 100%);
}

.controls-panel {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 30px;
    max-height: 600px;
    overflow-y: auto;
}

.controls-panel::-webkit-scrollbar {
    width: 8px;
}

.controls-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.controls-panel::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.control-section {
    margin-bottom: 25px;
}

.action-buttons, .emotion-buttons, .bg-buttons, .special-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.special-buttons {
    grid-template-columns: 1fr;
}

.action-btn, .emotion-btn, .bg-btn, .special-btn {
    background: white;
    border: 2px solid #667eea;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.3s ease;
    font-weight: bold;
}

.special-btn {
    border: 3px solid #ff6b6b;
    font-size: 1.1em;
}

.special-btn.talking {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    animation: pulse 1s infinite;
}

.action-btn:hover, .emotion-btn:hover, .bg-btn:hover, .special-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.special-btn:hover {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Animations */
@keyframes wave {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-30deg);
    }
    75% {
        transform: rotate(30deg);
    }
}

@keyframes jump {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-80px);
    }
}

@keyframes dance {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-10deg) scale(1.05);
    }
    75% {
        transform: rotate(10deg) scale(1.05);
    }
}

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

@keyframes wiggle {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px) rotate(-5deg);
    }
    75% {
        transform: translateX(10px) rotate(5deg);
    }
}

@keyframes bow {
    0%, 100% {
        transform: rotateX(0deg);
    }
    50% {
        transform: rotateX(30deg);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .create-layout, .play-area {
        grid-template-columns: 1fr;
    }
    
    .customization-panel, .controls-panel {
        max-height: none;
    }
    
    h1 {
        font-size: 2em;
    }
    
    h2 {
        font-size: 1.5em;
    }
}

@media (max-width: 768px) {
    .screen {
        padding: 20px;
    }
    
    .options-grid, .action-buttons, .emotion-buttons {
        grid-template-columns: 1fr;
    }
    
    .color-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
