html {
    touch-action: manipulation;
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    box-sizing: border-box;
    overflow: hidden;
}

h1 {
    color: white;
    text-align: center;
    font-size: 1.5em;
    margin: 5px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient 3s ease infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.wrapper-container {
    display: inline-block;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    overflow: hidden;
    margin: 0;
}

.tetris-container {
    display: flex;
    flex-direction: row;
    margin: 0;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 10px;
}

.tetris-panel-container {
    display: flex;
    padding: 10px;
    flex-direction: column;
    color: white;
    background: linear-gradient(135deg, #34495e, #2c3e50);
    min-width: 140px;
    border-radius: 0 10px 10px 0;
}

.score-panel {
    background: rgba(52, 73, 94, 0.8);
    padding: 8px;
    border-radius: 6px;
    margin: 5px 0;
    border: 2px solid #3498db;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

.score-panel p {
    margin: 3px 0;
    font-size: 0.8em;
    font-weight: bold;
    color: #ecf0f1;
}

.score-panel span {
    color: #3498db;
    font-size: 0.9em;
}

.high-scores {
    background: rgba(44, 62, 80, 0.9);
    padding: 8px;
    border-radius: 6px;
    margin-top: 8px;
    border: 2px solid #e74c3c;
    box-shadow: 0 2px 10px rgba(231, 76, 60, 0.3);
}

.high-scores h3 {
    margin: 0 0 5px 0;
    color: #e74c3c;
    text-align: center;
    font-size: 0.9em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.high-scores ol {
    margin: 0;
    padding-left: 12px;
    color: #ecf0f1;
    font-size: 0.75em;
}

.high-scores li {
    padding: 1px 0;
    font-weight: bold;
}

.reset-button {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 8px;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
    -webkit-user-select: none;
    user-select: none;
}

.reset-button:hover {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.reset-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(231, 76, 60, 0.3);
}

#stage {
    border: 3px solid #3498db;
    border-radius: 10px 0 0 10px;
    box-shadow: inset 0 0 20px rgba(52, 152, 219, 0.3);
    width: 200px;
    height: 400px;
}

#next {
    border: 2px solid #9b59b6;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(155, 89, 182, 0.3);
    width: 80px;
    height: 80px;
}

#message {
    font-size: 1em;
    font-weight: bold;
    color: #e74c3c;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: pulse 2s infinite;
    margin: 3px 0;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.tetris-panel-container-padding {
    flex-grow: 1;
}

.tetris-panel-container p {
   margin: 2px 0;
   padding: 0;
   font-size: 0.8em;
   color: #ecf0f1;
}

.tetris-button-panel {
    border-style: none;
    width: 100%;
    margin-top: 10px;
}

.tetris-button {
    padding: 8px 6px;
    text-align: center;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    font-size: 1em;
    font-weight: bold;
    border: 2px solid #2980b9;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    -webkit-user-select: none;
    user-select: none;
}

.tetris-button:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.tetris-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(52, 152, 219, 0.3);
}
