body{
    background-color: black;
    color: blanchedalmond; /* Add default text color for all content */
}

/* Home Button Styles */
.home-button-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.home-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid blanchedalmond;
    color: blanchedalmond;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.home-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: white;
    color: white;
    transform: translateY(-2px);
}

h1{
    text-align: center;  
    color: blanchedalmond;
    margin-top: 80px; /* Add top margin to prevent overlap with home button */
    margin-bottom: 20px;
}

h2{
    text-align: center;  
    color: blanchedalmond;
    margin-top: 80px; /* Add top margin to prevent overlap with home button */
    margin-bottom: 20px;
}

/* Style for the goal and rules text */
body > div {
    color: blanchedalmond;
    text-align: center;
    margin: 10px auto;
    max-width: 600px;
    padding: 0 20px;
}

/* Rules Section Styles */
.rules-section {
    text-align: center;
    margin: 20px auto;
    max-width: 600px;
    padding: 0 20px;
}

.rules-toggle-btn {
    background-color: rgba(255, 235, 205, 0.1);
    border: 2px solid blanchedalmond;
    color: blanchedalmond;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.rules-toggle-btn:hover {
    background-color: rgba(255, 235, 205, 0.2);
    border-color: white;
    color: white;
    transform: translateY(-1px);
}

.rules-content {
    background-color: rgba(255, 235, 205, 0.05);
    border: 1px solid rgba(255, 235, 205, 0.3);
    border-radius: 8px;
    padding: 20px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.rules-content.hidden {
    display: none;
}

.rules-content h3 {
    color: blanchedalmond;
    margin-bottom: 15px;
    font-size: 18px;
}

/* Style for lists */
ul {
    text-align: left;
    margin: 15px auto;
    max-width: 500px;
    padding-left: 20px;
}

li {
    color: blanchedalmond;
    margin-bottom: 8px;
    line-height: 1.4;
}

input{
    width: 50px;
    height: 50px;
    text-align: center; 
}

button{
    color: blanchedalmond;
    background-color: black;
}

.rows{
    display: flex;
    justify-content: center;
    align-items: center;
}

.ten{
    color: blanchedalmond;
    background-color: black;
    width: 55px;
    height: 55px;
    text-align: center;
    border: 2px solid blanchedalmond;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.twenty{
    color: blanchedalmond;
    background-color: black;
    width: 55px;
    height: 55px;
    text-align: center;
    border: 2px solid blanchedalmond;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.thirty{
    color: blanchedalmond;
    background-color: black;
    width: 55px;
    height: 55px;
    text-align: center;
    border: 2px solid blanchedalmond;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.fourty{
    color: blanchedalmond;
    background-color: black;
    width: 55px;
    height: 55px;
    text-align: center;
    border: 2px solid blanchedalmond;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.fitty{
    color: blanchedalmond;
    background-color: black;
    width: 55px;
    height: 55px;
    text-align: center;
    border: 2px solid blanchedalmond;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.sixty{
    color: blanchedalmond;
    background-color: black;
    width: 55px;
    height: 55px;
    text-align: center;
    border: 2px solid blanchedalmond;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.rows{
    text-align: center; 
}

.letters{
    text-align: center; 
    width: 30px;
    height: 30px;
} 

#keys1{
    text-align: center;
}

#keys2{
    text-align: center;
}

#keys3{
    text-align: center;
}

.action{
    text-align: center; 
    width: 60px;
    height: 30px;
} 

#keys4{
    text-align: center;
}

#message{
    color: blanchedalmond;
    text-align: center; 
}

.green {
    background-color: #6aaa64; /* Green */
    color: white;
}

.yellow {
    background-color: #c9b458; /* Yellow */
    color: white;
}

.gray {
    background-color: #787c7e; /* Gray */
    color: white;
}

/* Active tile with blinking cursor */
.active-tile {
    position: relative;
}

.active-tile::after {
    content: '|';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: blanchedalmond;
    font-weight: bold;
    animation: blink 1s infinite;
}

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

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .home-button-container {
        top: 15px;
        left: 15px;
    }
    
    .home-button {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    h1 {
        margin-top: 70px;
        font-size: 1.5rem;
    }
    
    h2 {
        margin-top: 70px;
        font-size: 1.3rem;
    }
    
    .ten, .twenty, .thirty, .fourty, .fitty, .sixty {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    /* Rules section mobile styles */
    .rules-section {
        padding: 0 15px;
    }
    
    .rules-toggle-btn {
        font-size: 13px;
        padding: 8px 16px;
    }
    
    .rules-content {
        padding: 15px;
    }
    
    .rules-content h3 {
        font-size: 16px;
    }
    
    /* Make text more readable on mobile */
    body > div {
        font-size: 14px;
        padding: 0 15px;
    }
    
    ul {
        font-size: 13px;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .home-button-container {
        top: 10px;
        left: 10px;
    }
    
    .home-button {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    h1 {
        margin-top: 60px;
        font-size: 1.2rem;
        padding: 0 10px;
    }
    
    h2 {
        margin-top: 60px;
        font-size: 1.1rem;
        padding: 0 10px;
    }
    
    .ten, .twenty, .thirty, .fourty, .fitty, .sixty {
        width: 40px;
        height: 40px;
        font-size: 16px;
        border-width: 1px;
    }
    
    .rows {
        gap: 2px;
    }
    
    /* Rules section mobile styles for small screens */
    .rules-section {
        padding: 0 10px;
    }
    
    .rules-toggle-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .rules-content {
        padding: 12px;
    }
    
    .rules-content h3 {
        font-size: 14px;
    }
    
    /* More compact text on small screens */
    body > div {
        font-size: 12px;
        padding: 0 10px;
        margin: 8px auto;
    }
    
    ul {
        font-size: 11px;
        max-width: 280px;
        padding-left: 15px;
    }
    
    li {
        margin-bottom: 6px;
    }
}