* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.fullscreen-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
    padding: 10px 20px;
    background: #4a9eff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s;
}

.fullscreen-btn:hover {
    background: #357abd;
}

.fullscreen-btn.active {
    background: #ff4a4a;
}

.fullscreen-btn.active:hover {
    background: #cc3838;
}

/* Hide fullscreen button when in fullscreen mode */
:fullscreen .fullscreen-btn {
    display: none;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
}

.phone {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 0.5vmin;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    width: auto;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 99vw;
    max-height: 99vh;
}

.screen {
    background: #8BC400;
    border: 0.3vmin solid #3a3a3a;
    border-radius: 4px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    width: auto;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

#display {
    border-collapse: separate;
    border-spacing: 0.2vmin;
    background: #8BC400;
    margin: 0 auto;
}

#display td {
    width: 1.5vmin;
    height: 1.5vmin;
    padding: 0;
    border: none;
    background: #8BC400;
}

#display td.on {
    background: #26370C;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.dpad {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.middle-row {
    display: flex;
    gap: 5px;
    align-items: center;
}

.btn {
    width: 50px;
    height: 50px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: transparent;
    font-size: 18px;
    cursor: default;
    transition: none;
}

.btn:hover {
    background: transparent;
}

.btn:active {
    transform: none;
    background: transparent;
}

.btn.select {
    background: transparent;
    width: 60px;
    height: 60px;
    font-size: 14px;
}

.btn.select:hover {
    background: transparent;
}

.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.num-btn {
    padding: 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: transparent;
    font-size: 12px;
    cursor: default;
    transition: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.num-btn:hover {
    background: transparent;
}

.num-btn:active {
    transform: none;
    background: transparent;
}

.action-btns {
    display: flex;
    gap: 10px;
}

.action-btn {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: transparent;
    font-size: 14px;
    cursor: default;
    transition: none;
}

.action-btn:hover {
    background: transparent;
}

.action-btn:active {
    transform: none;
}

#back {
    background: transparent;
    border: none;
}

#back:hover {
    background: transparent;
}
