* {
    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;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.5em;
}

.instruction {
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.instruction p {
    color: #333;
    font-size: 1.2em;
    font-weight: 500;
}

/* Draggable Solids */
.solids-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f0f4ff;
    border-radius: 15px;
    flex-wrap: wrap;
}

.draggable-solid {
    background: white;
    border: 3px solid #667eea;
    border-radius: 10px;
    padding: 15px 25px;
    cursor: grab;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1.1em;
    color: #333;
}

.draggable-solid:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.draggable-solid:active {
    cursor: grabbing;
}

.draggable-solid.dragging {
    opacity: 0.5;
}

.draggable-solid.matched {
    opacity: 0.3;
    pointer-events: none;
}

/* Table */
.table-container {
    margin-bottom: 30px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 1.1em;
}

tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

tbody tr:last-child {
    border-bottom: none;
}

tbody tr:hover {
    background: #f8f9fa;
}

td {
    padding: 15px;
    vertical-align: middle;
}

td:first-child {
    font-weight: bold;
    color: #667eea;
    font-size: 1.2em;
    text-align: center;
}

td:nth-child(2) {
    color: #333;
    line-height: 1.6;
}

/* Drop Zones */
.drop-zone {
    min-height: 50px;
    border: 3px dashed #ccc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 10px;
}

.drop-zone.drag-over {
    background: #e3f2fd;
    border-color: #667eea;
    transform: scale(1.05);
}

.drop-zone.blink-green {
    animation: blinkGreen 0.6s ease;
}

.drop-zone.blink-red {
    animation: blinkRed 0.6s ease;
}

.drop-zone.filled {
    border-color: #4caf50;
    background: #e8f5e9;
}

.drop-zone .dropped-text {
    font-weight: 600;
    color: #333;
    font-size: 1em;
}

.drop-zone .auto-filled {
    color: #17a2b8;
    opacity: 0.8;
}

.progress {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 20px;
}

.progress p {
    font-size: 1.3em;
    font-weight: bold;
    color: #667eea;
}

.progress span {
    color: #4caf50;
}

.button-container {
    text-align: center;
    margin-top: 20px;
}

.reset-btn {
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #f44336 0%, #e91e63 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

.reset-btn:active {
    transform: translateY(0);
}

@keyframes blinkGreen {
    0%, 100% { background: white; }
    50% { background: #4caf50; border-color: #4caf50; }
}

@keyframes blinkRed {
    0%, 100% { background: white; }
    50% { background: #f44336; border-color: #f44336; }
}

/* Clapping Animation */
.clapping-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    display: none;
}

.clapping-container.active {
    display: block;
}

.clap {
    position: absolute;
    font-size: 3em;
    animation: clapping 2s ease-out forwards;
    opacity: 0;
}

.clap:nth-child(1) { left: 10%; animation-delay: 0s; }
.clap:nth-child(2) { left: 20%; animation-delay: 0.1s; }
.clap:nth-child(3) { left: 30%; animation-delay: 0.2s; }
.clap:nth-child(4) { left: 40%; animation-delay: 0.3s; }
.clap:nth-child(5) { left: 50%; animation-delay: 0.4s; }
.clap:nth-child(6) { left: 60%; animation-delay: 0.5s; }
.clap:nth-child(7) { left: 70%; animation-delay: 0.6s; }
.clap:nth-child(8) { left: 80%; animation-delay: 0.7s; }
.clap:nth-child(9) { left: 90%; animation-delay: 0.8s; }
.clap:nth-child(10) { left: 50%; animation-delay: 0.9s; }

@keyframes clapping {
    0% {
        bottom: -10%;
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        bottom: 110%;
        opacity: 0;
        transform: scale(0.8) rotate(360deg);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.8em;
    }

    .solids-container {
        flex-direction: column;
    }

    .draggable-solid {
        width: 100%;
        text-align: center;
    }

    table {
        font-size: 0.9em;
    }

    th, td {
        padding: 10px;
    }

    .clap {
        font-size: 2em;
    }
}
