* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    background-color: #f0f0f0;
    overflow: hidden;
}

.ios-simulator {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    background-color: #000;
    overflow: hidden;
    box-shadow: none;
}

@media (orientation: portrait) {
    .ios-simulator {
        aspect-ratio: 9/19.5;
        height: 100vh;
        width: auto;
        max-width: 100vw;
        border-radius: 0;
    }
}

@media (orientation: landscape) {
    .ios-simulator {
        aspect-ratio: 19.5/9;
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .passcode-screen {
        /* Landscape adjustments removed and moved to new responsive file */
    }
    
    .passcode-screen .passcode-prompt {
        /* Landscape adjustments removed and moved to new responsive file */
    }
    
    .passcode-screen .passcode-dots {
        /* Landscape adjustments removed and moved to new responsive file */
    }
    
    .passcode-pad {
        /* Landscape adjustments removed and moved to new responsive file */
    }
    
    .error-message, .attempts-message {
        /* Landscape adjustments removed and moved to new responsive file */
    }
}

.boot-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    z-index: 10;
}

.lock-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    z-index: 5;
}

.status-bar {
    padding: 40px 20px 0;
    text-align: center;
    color: white;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.time {
    font-size: 70px;
    font-weight: 200;
    margin-bottom: 5px;
}

.date {
    font-size: 18px;
}

.slide-to-unlock {
    margin-top: auto;
    text-align: center;
    padding-bottom: 50px;
    color: white;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.slider-text {
    padding: 15px;
    font-size: 18px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.home-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f2f2f7;
    background-size: cover;
    background-position: center;
    z-index: 3;
    display: flex;
    flex-direction: column;
}

.home-screen .status-bar {
    background-color: transparent;
    color: #fff;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
    text-align: left;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-screen .time {
    font-size: 16px;
    font-weight: normal;
    margin: 0;
}

.app-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 20px;
    padding: 20px;
}

.app {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.app-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.app-icon.app-opening {
    transform: scale(2);
    opacity: 0;
}

.app-name {
    font-size: 12px;
    margin-top: 5px;
    color: #fff;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.safari-app {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    flex-direction: column;
    z-index: 6;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.safari-open {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

.safari-header {
    padding: 10px;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

.safari-nav {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.safari-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f0f0f0;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
    cursor: pointer;
}

.safari-button svg {
    width: 20px;
    height: 20px;
    fill: #007aff;
}

.safari-url-bar {
    flex: 1;
    background-color: #e0e0e0;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
}

.safari-url-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    padding: 0;
    color: #333;
}

.safari-url-input:focus {
    outline: none;
}

.safari-tabs-container {
    display: flex;
    align-items: center;
    overflow-x: auto;
    background-color: #f0f0f0;
    scrollbar-width: none;
}

.safari-tabs-container::-webkit-scrollbar {
    display: none;
}

.safari-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    flex: 1;
}

.safari-tab {
    padding: 10px 15px;
    background-color: #e0e0e0;
    border-radius: 8px 8px 0 0;
    margin-right: 5px;
    display: flex;
    align-items: center;
    cursor: pointer;
    min-width: 120px;
    max-width: 160px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.safari-tab.active {
    background-color: white;
}

.tab-title {
    flex: 1;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-close {
    margin-left: 10px;
    font-size: 18px;
    color: #999;
}

.new-tab-button {
    padding: 10px;
    background: none;
    border: none;
    color: #007aff;
    font-size: 24px;
    cursor: pointer;
}

.safari-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.safari-tab-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.safari-tab-content.hidden {
    display: none;
}

.dock {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    margin-bottom: 20px;
    background-color: rgba(242, 242, 247, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    margin: 0 10px 30px;
}

.battery-container {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.battery-icon {
    width: 25px;
    height: 12px;
    border: 1px solid white;
    border-radius: 3px;
    padding: 1px;
    margin-left: 5px;
    position: relative;
}

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

.battery-level {
    height: 100%;
    background-color: white;
    border-radius: 1px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.hidden {
    display: none;
}

.freeform-header {
    height: 60px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    padding: 0 15px;
}

.freeform-title {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

.freeform-close-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f0f0f0;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.freeform-close-button svg {
    width: 20px;
    height: 20px;
    fill: #666;
}

.freeform-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: white;
}

.freeform-canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    touch-action: none;
}

.freeform-toolbar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(245, 245, 245, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 15px;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #ddd;
}

.freeform-tools {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
}

.tool-button {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.tool-button svg {
    width: 24px;
    height: 24px;
    fill: #333;
}

.tool-button.active {
    background-color: #e0e0e0;
    border-color: #aaa;
}

.freeform-colors {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
}

.color-button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
}

.color-button.active {
    border-color: #333;
    transform: scale(1.2);
}

.size-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.size-label {
    font-size: 14px;
    color: #666;
    margin-right: 10px;
}

.size-slider {
    flex: 1;
}

.clear-button {
    padding: 8px 15px;
    border-radius: 8px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    margin-left: 15px;
    cursor: pointer;
}

.image-upload-container {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.image-upload-label {
    padding: 8px 15px;
    border-radius: 8px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    cursor: pointer;
    margin-right: 10px;
}

.image-upload {
    display: none;
}

.youtube-app {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    flex-direction: column;
    z-index: 6;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.youtube-open {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

.youtube-nav-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.youtube-close-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.youtube-close-button::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: white;
}

.phone-app {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    flex-direction: column;
    z-index: 6;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.phone-open {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

.phone-nav-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-close-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.phone-close-button::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: white;
}

.dialer-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.dialer-input {
    padding: 20px;
}

.phone-number-input {
    width: 100%;
    padding: 10px;
    font-size: 18px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.dialer-pad {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
}

.dialer-row {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
}

.dialer-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #f0f0f0;
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dialer-button.call-button {
    background-color: #4CAF50;
    color: white;
}

.notes-app {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 6;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.notes-open {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

.notes-header {
    padding: 15px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    display: flex;
}

.notes-title {
    font-size: 18px;
    text-align: center;
    font-weight: 500;
}

.notes-content {
    flex: 1;
    padding: 15px;
    position: relative;
    overflow: hidden;
}

.notes-editor {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    resize: none;
    font-size: 16px;
    line-height: 1.5;
    padding: 10px;
}

.notes-nav-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 20px;
}

.save-note-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.note-button::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: white;
}

.messages-app {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.messages-open {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

.messages-header {
    padding: 15px;
    background-color: #f5f55;
    border-bottom: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

.message-recipient-input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 15px;
    font-size: 16px;
    margin-bottom: 10px;
}

.message-input-container {
    display: flex;
    padding: 15px;
    background-color: #f5f55f5;
    align-items: center;
}

.message-text-input {
    flex: 1;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid #ddd;
    font-size: 16px;
}

.message-send-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #007aff;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.messages-content {
    flex: 1;
    position: relative;
    overflow: auto;
    touch-action: pan-y;
    padding: 15px;
}

.message-list {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    background-color: #f5f5f5;
}

.messages-nav-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.message-send-container {
    display: flex;
    justify-content: space-between;
}

.message-input-text {
    flex: 1;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 18px;
}

.message-send-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #007aff;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.app-handle {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 5px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    z-index: 50;
    cursor: pointer;
}