body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #f8f9fa;
    margin: 0;
}

.app-container {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    width: 320px;
}

h2 {
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.stats-container {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.puzzle-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    width: 280px;
    height: 280px;
    margin: 0 auto;
    padding: 1;
}

.tile {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    font-weight: bold;
    border-radius: 0; /* You can keep rounded corners if desired */
    cursor: pointer;
    user-select: none;
    transition: all 0.3s;
    margin: 0;
    padding: 0;
    border: none;
    box-sizing: border-box;
    overflow: hidden;
    background-image: url('puzzle-image.jpg');
    background-size: 280px 280px;
    background-repeat: no-repeat;
    color: transparent;
}

.tile.empty {
    background: transparent;
    cursor: default;
    background-image: none;
}

/* Buttons */
.button-container {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.ios-button {
    background: #007aff;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ios-button:hover {
    background: #005ecb;
    box-shadow: 0 6px 12px rgba(0, 122, 255, 0.4);
}

/* Hint Popup */
.hint-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    width: 280px;
    text-align: center;
}

.hint-image {
    width: 280px;
    height: 280px;
    background-image: url('puzzle-image.jpg');
    background-size: cover;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hidden {
    display: none;
}

/* Win Popup */
.win-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    width: 250px;
    text-align: center;
}

.win-popup h3 {
    color: #28a745;
    font-weight: 600;
}

.win-popup button {
    background: #28a745;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

.win-popup button:hover {
    background: #218838;
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.4);
}

.back-btn {
    margin-top: 10px;
    width: 100%;
    background: #ff3b30;
    box-shadow: 0 4px 10px rgba(255, 59, 48, 0.3);
}

.back-btn:hover {
    background: #d32f2f;
    box-shadow: 0 6px 12px rgba(255, 59, 48, 0.4);
}
