/* Existing styles from before remain here */
/* Reset and Basics */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header */
header {
    background: #1a73e8;
    color: white;
    padding: 1rem;
    text-align: center;
}

header h1 {
    font-size: 2rem;
}

nav {
    margin-top: 0.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 1rem;
}

nav a:hover {
    text-decoration: underline;
}

/* Main Content */
main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.intro, .app-detail, .news, .contact {
    margin-bottom: 2rem;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

/* App Cards */
.apps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.app-card {
    padding: 1rem;
    text-align: center;
}

.app-card img {
    max-width: 100%;
    height: auto;
}

.app-card h3 {
    margin: 0.5rem 0;
}

.app-card a {
    display: inline-block;
    margin-top: 0.5rem;
    color: #1a73e8;
    text-decoration: none;
}

.app-card a:hover {
    text-decoration: underline;
}

/* Tetris Game */
#game-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

#tetris-canvas {
    border: 1px solid #000;
}

/* News */
article {
    margin-bottom: 1.5rem;
}

article h3 {
    font-size: 1.2rem;
}

/* Contact Form */
form {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 1rem 0;
}

label {
    margin: 0.5rem 0 0.2rem;
}

input, textarea {
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    padding: 0.5rem;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: #1557b0;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    background: #f5f5f5;
}

footer a {
    color: #1a73e8;
}

/* Responsive */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.5rem;
    }
    nav a {
        margin: 0 0.5rem;
    }
    main {
        padding: 1rem;
    }
}
/* Tetris-Specific Styles */
#game-container {
    position: relative;
    display: flex;
    align-items: flex-start;
    background: #d6eaff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin: 1rem auto;
    max-width: 550px;
}

#tetris {
    border: 2px solid #1e3c72;
    border-radius: 10px;
}

#ui {
    margin-left: 20px;
    color: #1e3c72;
    font-size: 18px;
    background: #d6eaff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#start-screen, #pause-overlay, #help-panel {
    position: absolute;
    top: 49%;
    left: 32%;
    transform: translate(-50%, -50%);
    background: #2a5298;
    padding: 20px;
    color: #ffffff;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

#start-screen { z-index: 10; }
#pause-overlay { z-index: 20; display: none; background: rgba(30, 60, 114, 0.9); }
#help-panel { z-index: 30; display: none; max-width: 400px; }

#ui p { margin: 10px 0; }
#level-input {
    width: 50px;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #1e3c72;
}

#pause-help-btn { margin-top: 10px; }