body {
    margin: 0 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.container {
    height: 80vh;
    margin: 10vh auto;
    width: auto;
}

.phone {
    position: relative;
    width: 400px;
    height: 800px;
    border-radius: 45px;
    background: #000;
    padding: 10px;
    border: 5px solid #111;
}

.phone .notch-container {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100px;
    z-index: 10;
}

.phone .notch-container .notch {
    width: 140px;
    height: 30px;
    margin: 0 auto;
    background-color: #111;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.phone-content {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 35px;
    display: flex;
    flex-direction: column;
    padding: 0;
    box-sizing: border-box;
}

/* Status Bar Styles */
.status-bar {
    height: 40px;
    background: #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    border-top-left-radius: 35px;
    border-top-right-radius: 35px;
    margin-bottom: 5px;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-right {
    display: flex;
    align-items: center;
    gap: 5px;
}

.signal-strength {
    display: flex;
    gap: 2px;
    align-items: flex-end;
}

.signal-bar {
    width: 3px;
    background: #fff;
    border-radius: 1px;
}

.signal-bar:nth-child(1) { height: 4px; }
.signal-bar:nth-child(2) { height: 6px; }
.signal-bar:nth-child(3) { height: 8px; }
.signal-bar:nth-child(4) { height: 10px; }

.battery {
    display: flex;
    align-items: center;
    gap: 3px;
}

.battery-icon {
    width: 20px;
    height: 10px;
    border: 1px solid #fff;
    border-radius: 2px;
    position: relative;
    background: #fff;
}

.battery-icon::after {
    content: '';
    position: absolute;
    right: -3px;
    top: 3px;
    width: 2px;
    height: 4px;
    background: #fff;
    border-radius: 0 1px 1px 0;
}

.carrier-info {
    font-size: 11px;
    opacity: 0.9;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

.ussd-display {
    flex: 1;
    background: #1a1a1a;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    border: 2px solid #333;
    overflow-y: auto; /* Add scrollbar if content overflows */
}

.ussd-text {
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 14px; /* Reduced from 16px for better fit */
    line-height: 1.4;
    word-wrap: break-word; /* Break long words */
    white-space: normal; /* Changed from pre-wrap to allow proper wrapping */
    overflow-wrap: break-word; /* Additional word breaking */
}

.input-display {
    margin-bottom: 15px;
}

.input-field {
    width: 100%;
    height: 45px;
    background: #222;
    border: 2px solid #444;
    border-radius: 10px;
    color: #fff;
    font-size: 18px;
    font-family: 'Courier New', monospace;
    padding: 0 15px;
    box-sizing: border-box;
    text-align: center;
    letter-spacing: 2px;
}

.input-field:focus {
    outline: none;
    border-color: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.input-field::placeholder {
    color: #666;
    letter-spacing: normal;
}

.keypad {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.keypad-row {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.key {
    width: 28px;
    height: 35px;
    background: #333;
    color: white;
    border: 1px solid #555;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.key:hover {
    background: #444;
    transform: scale(0.95);
}

.key:active {
    background: #555;
    transform: scale(0.9);
}

.key.special {
    background: #2d5aa0;
}

.key.special:hover {
    background: #3d6ab0;
}

.key.action {
    background: linear-gradient(135deg, #4285f4, #3367d6);
    width: 55px;
    font-size: 12px;
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
    border: none;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    color: white;
}

.key.action:hover {
    background: linear-gradient(135deg, #5296f5, #4478e6);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
}

.key.action:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(66, 133, 244, 0.3);
}


.key.action:disabled {
    background: linear-gradient(135deg, #666, #444);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: not-allowed;
    transform: none;
}

.key.action:disabled:hover {
    background: linear-gradient(135deg, #666, #444);
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.key.action.send {
    background: linear-gradient(135deg, #34a853, #2d8e47);
    box-shadow: 0 4px 15px rgba(52, 168, 83, 0.3);
}

.key.action.send:hover {
    background: linear-gradient(135deg, #46b366, #389857);
    box-shadow: 0 6px 20px rgba(52, 168, 83, 0.4);
}
