@import url('https://fonts.googleapis.com/css2?family=Helvetica+Neue:wght@300;400;500&family=Press+Start+2P&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.device {
    position: relative;
    background: url('iphone.png') no-repeat center center;
    background-size: contain;
    width: 280px;
    height: 497px;
}

.screen {
    position: absolute;
    width: 176px;
    height: 264px;
    top: 115px;
    left: 52px;
    background: url('blood_moon_wallpaper.png') no-repeat center center;
    background-size: cover;
    overflow: hidden;
    padding: 0;
}

.status-bar {
    height: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
    padding: 0 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3); 
    font-weight: 300; 
}

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

#carrier-text {
    font-weight: 500;
}

.status-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

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

.wifi-icon, .battery-icon {
    color: #999;
    font-size: 10px;
}

.wifi-icon {
    background: url('wifi.png') no-repeat center center;
    background-size: contain;
    width: 20px;
    height: 10px;
    display: inline-block;
}

.battery-icon {
    background: url('battery.png') no-repeat center center;
    background-size: contain;
    width: 20px;
    height: 10px;
    display: inline-block;
}

.home-screen {
    height: 200px;
    padding: 8px 4px 4px;
    position: relative;
    overflow: hidden;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    transition: transform 0.3s ease;
    position: absolute;
    width: 100%;
    padding: 0 8px;
    padding-left: 0px;
}

.page-1 {
    transform: translateX(0);
}

.page-2 {
    transform: translateX(100%);
}

.page-2.active {
    transform: translateX(0);
}

.page-1.hidden {
    transform: translateX(-100%);
}

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

.app-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    position: relative;
    cursor: pointer;
    transition: transform 0.1s ease;
    background: linear-gradient(135deg, #ccc 0%, #999 50%, #666 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.app-icon:active {
    transform: scale(0.95);
}

.app-label {
    color: white;
    font-size: 8px;
    text-align: center;
    margin-top: 2px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.page-indicators {
    position: absolute;
    bottom: 1px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.indicator {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.indicator.active {
    background: white;
}

.dock {
    position: absolute;
    bottom: 0;
    left: 4px;
    right: 4px;
    height: 25px; /* Keeping your original height */
    padding: 0 8px;
    display: flex;
    justify-content: space-around;
    align-items: center;

    /* Sharp rectangle glass effect */
    background: linear-gradient(to bottom, 
        rgba(255,255,255,0.7) 0%, 
        rgba(255,255,255,0.3) 100%
    );
    backdrop-filter: blur(4px);
    
    /* Remove rounded corners */
    border-radius: 0;
    
    /* Sharp edge highlights */
    border-top: 1px solid rgba(255,255,255,0.8);
    box-shadow: 
        inset 0 8px 10px rgba(255,255,255,0.4),
        0 1px 3px rgba(0,0,0,0.2);
    z-index: 5;
}

.dock::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    /* Main glass gradient */
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0.25) 0%, 
        rgba(0,0,0,0.1) 5%, 
        rgba(0,0,0,0) 15%, 
        rgba(0,0,0,0) 80%, 
        rgba(0,0,0,0.3) 100%
    );
    /* Top edge highlight */
    border-top: 1px solid rgba(255,255,255,0.3);
    z-index: -1;
}
.dock-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.dock .app-icon {
    /* Maintain reflection effect */
    width: 28px;
    height: 28px;
    margin-bottom: 24px; /* Keep original spacing */
    
    /* Enhanced iOS 6 glass reflection */
    -webkit-box-reflect: below 2px linear-gradient(
        to bottom, 
        transparent, 
        transparent 70%, 
        rgba(255,255,255,0.15)
    );
    
    /* Sharper shadows for rectangular dock */
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.6);
    
    /* Contact shadow for seated effect */
    filter: drop-shadow(0 -1px 1px rgba(0,0,0,0.15));
}

/* Bonus: Add subtle hover effect */
.dock .app-icon:hover {
    transform: scale(1.1);
    -webkit-box-reflect: below 2px linear-gradient(
        to bottom, 
        transparent, 
        transparent 60%, 
        rgba(255,255,255,0.25)
    );
}

.dock-label {
    display: none;
}

.app-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    transform: scale(0);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 100;
}

.app-screen.open {
    transform: scale(1);
    opacity: 1;
}

.app-header {
    height: 44px;
    background: linear-gradient(180deg, #d4d4d4 0%, #b8b8b8 100%);
    border-bottom: 1px solid #999;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.back-btn {
    position: absolute;
    left: 10px;
    background: linear-gradient(180deg, #6d84a3 0%, #4a5d7a 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.app-content {
    padding: 20px;
    height: calc(100% - 44px);
    overflow-y: auto;
}

.lock-screen {
    position: absolute;
    top: 20px; /* Below status bar */
    left: 0;
    width: 100%;
    height: calc(100% - 20px);
    z-index: 150;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 0;
    transition: opacity 0.5s ease-out;
}

.lock-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.lock-screen-top {
    text-align: center;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    margin-top: 10px;
}

.lock-screen-time {
    font-size: 38px;
    font-weight: 100;
    line-height: 1;
}

.lock-screen-date {
    font-size: 11px;
    font-weight: 300;
    margin-top: 2px;
}

.lock-screen-bottom {
    padding-bottom: 20px;
}

.screen.locked .home-screen,
.screen.locked .dock {
    display: none;
}

.unlock-slider {
    position: relative;
    bottom: -30px;
    width: 90%;
    height: 32px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.2), 0 1px 0 rgba(255,255,255,0.1);
    margin: 0 auto;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.slider-track {
    width: 100%;
    text-align: right;
    position: relative;
    right: 10px;
}

.slider-thumb {
    position: absolute;
    left: 2px;
    top: 2px;
    width: 28px;
    height: 28px;
    background: linear-gradient(180deg, #f0f0f0, #c0c0c0);
    border-radius: 5px;
    cursor: grab;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 20px;
    font-weight: 300;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    touch-action: none;
}
.slider-thumb:active {
    cursor: grabbing;
}

.lock-btn {
    position: absolute;
    top: 67px;
    right: 76px;
    width: 30px;
    height: 2px;
    background: #333;
    border: 1px solid #111;
    border-radius: 2px;
    cursor: pointer;
}

.home-btn {
    position: absolute;
    bottom: 75px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #333 0%, #111 100%);
    border-radius: 50%;
    border: 2px solid #666;
    cursor: pointer;
    transition: all 0.1s ease;
}

.home-btn:active {
    transform: translateX(-50%) scale(0.95);
}

/* App-specific icon styles */
.phone-icon { 
    background: url('phone (1).png') no-repeat center center;
    background-size: cover;
}
.mail-icon { 
    background: url('mail.png') no-repeat center center;
    background-size: cover;
}
.safari-icon { 
    background: url('safari.png') no-repeat center center;
    background-size: cover;
}
.ipod-icon { 
    background: url('music (1).png') no-repeat center center;
    background-size: cover;
}
.messages-icon { 
    background: url('messages.png') no-repeat center center;
    background-size: cover;
}
.calendar-icon { background: linear-gradient(135deg, #F44336 0%, #C62828 100%); }
.photos-icon { 
    background: url('gallery.png') no-repeat center center;
    background-size: cover;
}
.camera-icon { 
    background: url('camera.png') no-repeat center center;
    background-size: cover;
}
.settings-icon { 
    background: url('settings (1).png') no-repeat center center;
    background-size: cover;
}
.notes-icon { 
    background: url('notes (1).png') no-repeat center center;
    background-size: cover;
}
.maps-icon { 
    background: url('maps.png') no-repeat center center;
    background-size: cover;
}
.stocks-icon { 
    background: url('stocks.png') no-repeat center center;
    background-size: cover;
}
.weather-icon { 
    background: url('weather.png') no-repeat center center;
    background-size: cover;
}
.clock-icon { 
    background: url('clock_icon.png') no-repeat center center;
    background-size: cover;
}
.calculator-icon { 
    background: url('calculator (1).png') no-repeat center center;
    background-size: cover;
}
.youtube-icon { 
    background: url('youtube.png') no-repeat center center;
    background-size: cover;
}

.instagram-icon { 
    background: url('instagram.png') no-repeat center center;
    background-size: cover;
}

.appstore-icon { 
    background: url('appstore.png') no-repeat center center;
    background-size: cover;
}

.info-icon { 
    background: url('info_icon.png') no-repeat center center;
    background-size: cover;
}

.flappybird-icon { 
    background: url('FlappyBird.png') no-repeat center center;
    background-size: cover;
}

/* New App Icons */
.voice-memos-icon {
    background: url('voice_memos_icon.png') no-repeat center center;
    background-size: cover;
}
.compass-icon {
    background: url('compass_icon.png') no-repeat center center;
    background-size: cover;
}

/* Info app specific styles */
.info-content {
    padding: 20px;
    background: #f7f7f7;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    height: calc(100% - 44px);
    overflow-y: auto;
}

/* Instagram app specific styles */
.instagram-content {
    padding: 0;
    height: 100%; /* Occupy full height as it's the only content within screen */
    display: flex;
    flex-direction: column;
    background: #EFEFF4;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 1px,
            rgba(0,0,0,0.02) 1px,
            rgba(0,0,0,0.02) 2px
        );
}

/* Instagram app specific styles */
.instagram-header-bar {
    height: 44px;
    background: linear-gradient(180deg, #A0522D 0%, #654321 100%);
    border-bottom: 1px solid #4A2C17;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
    color: white;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    flex-shrink: 0;
}

.header-icon {
    font-size: 16px;
    cursor: pointer;
    opacity: 0.8;
}

.header-title {
    font-size: 18px;
    font-weight: 500;
}

.instagram-feed {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    background: #F8F8F8; /* Lighter background for feed */
}

.feed-message {
    text-align: center;
    color: #666;
    font-size: 10px;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.feed-post {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.post-header {
    display: flex;
    align-items: center;
    padding: 8px;
    gap: 8px;
    border-bottom: 1px solid #eee;
}

.post-avatar {
    width: 24px;
    height: 24px;
    background: linear-gradient(45deg, #ccc, #aaa); /* Placeholder avatar */
    border-radius: 50%;
    border: 1px solid #bbb;
}

.post-username {
    font-weight: bold;
    font-size: 11px;
    color: #333;
}

.post-image {
    width: calc(100% - 2px); /* Account for 1px border on each side */
    aspect-ratio: 1; /* Square image */
    background: linear-gradient(135deg, #eee 0%, #ddd 100%); /* Placeholder image */
    margin: 1px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.post-actions {
    padding: 8px;
    font-size: 10px;
    color: #666;
    display: flex;
    gap: 12px;
    border-bottom: 1px solid #eee;
    margin-bottom: 4px;
}

.post-actions span {
    cursor: pointer;
    transition: color 0.1s ease;
}

.post-actions span:active {
    color: #007AFF;
}

.post-caption {
    padding: 0 8px;
    font-size: 10px;
    color: #333;
    line-height: 1.4;
}

.instagram-tab-bar {
    height: 44px;
    background: linear-gradient(180deg, #A0522D 0%, #654321 100%);
    border-top: 1px solid #4A2C17;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 2px;
    flex-shrink: 0;
}

.instagram-tab-bar .tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    cursor: pointer;
    padding: 4px 0;
    transition: all 0.2s ease;
    border-radius: 4px;
    position: relative;
}

.instagram-tab-bar .tab-item.active {
    background: rgba(255,255,255,0.1);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}

.instagram-tab-bar .tab-icon {
    font-size: 16px;
    color: white;
    margin-bottom: 2px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.5);
}

.instagram-tab-bar .tab-label {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    font-size: 8px;
    color: white;
    text-shadow: 0 1px 1px rgba(0,0,0,0.5);
}

/* Weather app styles */
.weather-content {
    padding: 0;
    background: linear-gradient(180deg, #7EC0EE 0%, #58ABE8 100%);
    position: relative;
    overflow: hidden;
}

.weather-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZGVmcz48cGF0dGVybiBpZD0iYSIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeD0iMCIgeT0iMCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIj48cGF0aCBkPSJNIDAgMCBMIDIwIDAgTCAyMCAyMCBMIDAgMjAgeiIgZmlsbD0iIzAwMCIgZmlsbC1vcGFjaXR5PSIwLjAyIi8+PC9wYXR0ZXJuPjwvZGVmcz48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2EpIi8+PC9zdmc+');
    opacity: 0.05;
    pointer-events: none;
}

.weather-main-card {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    margin: 20px;
    padding: 30px 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.weather-location {
    position: relative;
    margin-bottom: 10px;
}

.weather-location span {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.location-reflection {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) scaleY(-1);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: white;
    opacity: 0.3;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.weather-temperature {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 100;
    font-size: 64px;
    color: white;
    margin: 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

.weather-condition {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: white;
    margin-bottom: 15px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.weather-high-low {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    font-size: 14px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.weather-controls {
    display: flex;
    justify-content: center;
    margin: 20px;
}

.segmented-control {
    display: flex;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.segment {
    padding: 8px 20px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.segment.active {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.forecast-container {
    margin: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.forecast-scroll {
    display: flex;
    gap: 15px;
    padding: 10px 0;
    min-width: 100%;
}

.forecast-day {
    flex: 0 0 60px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 15px 8px;
    text-align: center;
    backdrop-filter: blur(5px);
    transform: perspective(200px) rotateY(2deg);
    transition: transform 0.2s ease;
}

.forecast-day:hover {
    transform: perspective(200px) rotateY(0deg);
}

.day-name {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.day-icon {
    font-size: 20px;
    margin-bottom: 8px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.day-temps {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.day-high {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: white;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.day-low {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

/* Photos app specific styles */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 10px;
    background: #f7f7f7;
    height: calc(100% - 44px);
    overflow-y: auto;
}

.photos-header {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    font-size: 20px;
    color: #255;
    margin-bottom: 10px;
    padding: 0 5px;
}

.photo-thumbnail {
    aspect-ratio: 1;
    background: white;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
}

.photo-thumbnail:active {
    box-shadow: 0 0 0 3px #4E9EF1;
}

.photo-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(0,0,0,0.1) 100%);
    pointer-events: none;
}

/* Photo viewer styles */
.photo-viewer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f7f7f7;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 1px,
            rgba(0,0,0,0.02) 1px,
            rgba(0,0,0,0.02) 2px
        );
    z-index: 200;
    display: none;
    flex-direction: column;
}

.photo-viewer.active {
    display: flex;
}

.photo-nav-bar {
    height: 44px;
    background: linear-gradient(180deg, #B4B4B4 0%, #7F7F7F 100%);
    border-bottom: 1px solid #666;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    position: relative;
}

.photo-back-btn {
    background: linear-gradient(180deg, #6d84a3 0%, #4a5d7a 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 4px;
}

.photo-back-btn:active {
    background: linear-gradient(180deg, #4a5d7a 0%, #6d84a3 100%);
}

.photo-action-btn {
    background: linear-gradient(180deg, #6d84a3 0%, #4a5d7a 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.photo-action-btn:active {
    background: linear-gradient(180deg, #4a5d7a 0%, #6d84a3 100%);
}

.photo-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.photo-display img {
    max-width: 140%;
    max-height: 140%;
    border-radius: 3px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.photo-filmstrip {
    height: 40px;
    background: linear-gradient(180deg, #B4B4B4 0%, #7F7F7F 100%);
    border-top: 1px solid #666;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.photo-filmstrip.hidden {
    opacity: 0;
}

.filmstrip-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
}

.filmstrip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: background-color 0.3s ease;
}

.filmstrip-dot.active {
    background: white;
}

/* Controls fade animation */
.photo-controls {
    transition: opacity 0.3s ease;
}

.photo-controls.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Notes app specific styles */
.notes-content {
    padding: 0;
    background: #FFCC33;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.notes-list {
    height: calc(100% - 44px);
    overflow-y: auto;
    background: #FFCC33;
}

.note-editor-content {
    height: calc(100% - 88px);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Notes app specific styles */
.notes-nav-bar {
    height: 44px;
    background: linear-gradient(180deg, #8B4513 0%, #654321 100%);
    border-bottom: 1px solid #4A2C17;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.notes-title {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: bold;
    font-size: 20px;
    color: white;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

.notes-add-btn {
    background: linear-gradient(180deg, #A0522D 0%, #654321 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.notes-add-btn:active {
    background: linear-gradient(180deg, #654321 0%, #A0522D 100%);
}

.note-item {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
    transition: background-color 0.2s ease;
    background: rgba(255,255,255,0.1);
}

.note-item:active {
    background: rgba(0,0,0,0.1);
}

.note-title {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    font-size: 17px;
    color: #333;
    margin-bottom: 4px;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

.note-preview {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

.note-date {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    font-size: 12px;
    color: #666;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

.note-editor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #FFCC33;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 50;
}

.note-editor.active {
    transform: translateX(0);
}

.note-editor-nav {
    height: 44px;
    background: linear-gradient(180deg, #8B4513 0%, #654321 100%);
    border-bottom: 1px solid #4A2C17;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.note-back-btn {
    background: linear-gradient(180deg, #A0522D 0%, #654321 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 4px;
}

.note-back-btn:active {
    background: linear-gradient(180deg, #654321 0%, #A0522D 100%);
}

.note-done-btn {
    background: linear-gradient(180deg, #A0522D 0%, #654321 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.note-done-btn:active {
    background: linear-gradient(180deg, #654321 0%, #A0522D 100%);
}

.note-editor-content {
    height: calc(100% - 88px);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.note-title-input {
    background: transparent;
    border: none;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: bold;
    font-size: 17px;
    color: #333;
    padding: 0;
    outline: none;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
    border-bottom: 1px solid rgba(0,0,0,0.2);
    padding-bottom: 8px;
}

.note-title-input::placeholder {
    color: #666;
}

.note-body-input {
    background: transparent;
    border: none;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    font-size: 17px;
    color: #333;
    padding: 0;
    outline: none;
    resize: none;
    flex: 1;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

.note-body-input::placeholder {
    color: #666;
}

.note-toolbar {
    height: 44px;
    background: linear-gradient(180deg, #8B4513 0%, #654321 100%);
    border-top: 1px solid #4A2C17;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.toolbar-btn {
    background: linear-gradient(180deg, #A0522D 0%, #654321 100%);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
    font-weight: bold;
}

.toolbar-btn:active {
    background: linear-gradient(180deg, #654321 0%, #A0522D 100%);
}

/* App Store specific styles */
.appstore-header {
    background: linear-gradient(180deg, #B4B4B4 0%, #7F7F7F 100%);
    color: #333;
    border-bottom: 1px solid #666;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

.appstore-content {
    padding: 0;
    background: #EFEFF4;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 1px,
            rgba(0,0,0,0.02) 1px,
            rgba(0,0,0,0.02) 2px
        );
    height: calc(100% - 44px);
    overflow-y: auto;
    font-size: 12px;
}

.appstore-search-bar {
    padding: 8px 10px 4px;
    background: #EFEFF4;
}

.appstore-search-bar input {
    width: 100%;
    height: 28px;
    border-radius: 14px;
    border: 1px solid #BDBDBD;
    background-color: #E5E5E5;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 12px;
    color: #333;
    padding: 0 10px 0 28px;
    outline: none;
}

.appstore-search-bar input::placeholder {
    color: #8E8E93;
    text-align: center;
    padding-right: 28px;
}

.appstore-search-bar input:focus::placeholder {
    text-align: left;
}

.appstore-tab-bar {
    height: 32px;
    background: linear-gradient(180deg, #B4B4B4 0%, #7F7F7F 100%);
    border-top: 1px solid #666;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 2px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.tab-item {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    font-size: 8px;
    color: #333;
    padding: 4px 2px;
    text-align: center;
    cursor: pointer;
    transition: color 0.2s ease;
    border-radius: 3px;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.1) 100%);
    border: 1px solid rgba(0,0,0,0.2);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    flex: 1;
}

.appstore-featured {
    padding: 8px;
    padding-bottom: 40px;
}

.featured-banner {
    background: linear-gradient(180deg, #007AFF 0%, #004AFF 100%);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.banner-title {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: bold;
    font-size: 14px;
    color: white;
    margin-bottom: 3px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.banner-subtitle {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    font-size: 10px;
    color: rgba(255,255,255,0.8);
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

.app-cards {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app-card {
    background: white;
    border-radius: 6px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.1);
}

.app-card-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    position: relative;
}

.app-card-icon img {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    -webkit-box-reflect: below 1px -webkit-linear-gradient(bottom, rgba(255,255,255,0.3) 0%, transparent 50%);
}

.app-card-info {
    flex: 1;
    min-width: 0;
}

.app-card-title {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    font-size: 11px;
    color: #333;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-card-category {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    font-size: 9px;
    color: #8E8E93;
    margin-bottom: 2px;
}

.app-card-rating {
    font-size: 8px;
    color: #FFD700;
}

.app-card-price {
    flex-shrink: 0;
}

.price-tag {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    font-size: 8px;
    padding: 3px 6px;
    border-radius: 8px;
    text-align: center;
    min-width: 32px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.price-tag.free {
    background: linear-gradient(180deg, #4CD964 0%, #2DBE4F 100%);
    color: white;
    border: 1px solid #2DBE4F;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.price-tag.paid {
    background: linear-gradient(180deg, #FF9500 0%, #E6820A 100%);
    color: white;
    border: 1px solid #E6820A;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.price-tag:active {
    transform: scale(0.95);
}

/* Settings app specific styles */
.settings-header {
    background: linear-gradient(180deg, #B4B4B4 0%, #7F7F7F 100%);
    color: #333;
    border-bottom: 1px solid #666;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

.settings-content {
    background: #C7CDD4;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 1px,
            rgba(0,0,0,0.02) 1px,
            rgba(0,0,0,0.02) 2px
        );
    padding: 0;
    height: calc(100% - 44px);
    overflow-y: auto;
}

.settings-section {
    margin-bottom: 35px;
}

.settings-section-header {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: bold;
    font-size: 16px;
    color: #4C566C;
    padding: 22px 15px 10px 15px;
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.settings-group {
    background: white;
    border-top: 1px solid #B2B2B2;
    border-bottom: 1px solid #B2B2B2;
    box-shadow: 0 1px 0 rgba(255,255,255,0.8);
    margin: 0 10px;
    border-radius: 10px;
    overflow: hidden;
}

.settings-cell {
    border-bottom: 1px solid #E1E1E1;
    background: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
}

.settings-cell:last-child {
    border-bottom: none;
}

.settings-cell:active {
    background: rgba(0,0,0,0.05);
}

.settings-cell-content {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    font-size: 17px;
    color: #333;
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.settings-detail {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-text {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    font-size: 17px;
    color: #3C7DC4;
}

.disclosure-indicator {
    font-size: 18px;
    color: #C7C7CC;
    font-weight: 300;
}

.toggle-switch {
    position: relative;
    width: 51px;
    height: 31px;
    background: linear-gradient(180deg, #E5E5E5 0%, #F7F7F7 100%);
    border: 1px solid #D1D1D1;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

.toggle-switch.active {
    background: linear-gradient(180deg, #4CD964 0%, #2DBE4F 100%);
    border: 1px solid #2DBE4F;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-thumb {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 27px;
    height: 27px;
    background: linear-gradient(180deg, #FFFFFF 0%, #E5E5E5 100%);
    border: 1px solid #D1D1D1;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.toggle-switch.active .toggle-thumb {
    transform: translateX(20px);
    background: linear-gradient(180deg, #FFFFFF 0%, #F7F7F7 100%);
    border: 1px solid #FFFFFF;
}

.brightness-cell {
    padding: 0 !important;
}

.brightness-slider {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
}

.brightness-icon {
    font-size: 16px;
    color: #666;
}

.brightness-icon.dim {
    opacity: 0.4;
}

.brightness-icon.bright {
    opacity: 1;
}

.slider {
    flex: 1;
    height: 23px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(180deg, #E5E5E5 0%, #F7F7F7 100%);
    border: 1px solid #D1D1D1;
    border-radius: 12px;
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 23px;
    height: 23px;
    background: linear-gradient(180deg, #FFFFFF 0%, #E5E5E5 100%);
    border: 1px solid #D1D1D1;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.slider::-moz-range-thumb {
    width: 23px;
    height: 23px;
    background: linear-gradient(180deg, #FFFFFF 0%, #E5E5E5 100%);
    border: 1px solid #D1D1D1;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Phone app specific styles (iOS 6 Redesign) */
#phone-screen {
    background: url('blood_moon_wallpaper.png') no-repeat center center;
    background-size: cover;
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.phone-header-bar {
    height: 44px;
    background: linear-gradient(180deg, #d4d4d4 0%, #b8b8b8 100%);
    border-bottom: 1px solid #999;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.phone-header-title {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: bold;
    font-size: 16px;
    color: #4a4a4a;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.phone-add-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(180deg, #d4d4d4 0%, #b8b8b8 100%);
    border: 1px solid #999;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    font-size: 20px;
    font-weight: 300;
    color: #007aff;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.phone-add-button:active {
    background: linear-gradient(180deg, #b8b8b8 0%, #d4d4d4 100%);
}

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

.phone-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    overflow-y: auto;
}

.phone-view.active {
    display: block;
}

#phone-view-keypad {
    display: none;
    flex-direction: column;
    padding: 10px 5px;
    gap: 8px;
    justify-content: space-around;
}

#phone-view-keypad.active {
    display: flex;
}

.phone-info-text {
    text-align: center;
    margin-top: 40px;
    color: #666;
    font-size: 14px;
    text-shadow: 0 1px 0 white;
}

.phone-tab-bar {
    height: 44px;
    background: linear-gradient(180deg, #333 0%, #1a1a1a 100%);
    border-top: 1px solid #444;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    padding: 0 2px;
    flex-shrink: 0;
}

.phone-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    cursor: pointer;
    position: relative;
    color: #999;
}

.phone-tab:active {
    background-color: rgba(255, 255, 255, 0.1);
}

.phone-tab.active {
    color: white;
    background-image: linear-gradient(to top, rgba(0, 122, 255, 0.5) 0%, rgba(0, 122, 255, 0) 60%);
}

.phone-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #007AFF;
    box-shadow: 0 0 5px #007AFF;
}

.phone-tab-icon {
    font-size: 16px;
    margin-bottom: 2px;
}

.phone-tab-label {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    font-size: 8px;
}

#phone-screen .phone-display-area {
    height: 40px;
    background: #e0e0e0;
    border: 1px solid #c0c0c0;
    border-radius: 5px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 10px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

#phone-screen .phone-display {
    font-family: 'Helvetica Neue', monospace;
    font-size: 24px;
    color: #333;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    width: 100%;
    line-height: 1;
}

#phone-screen .phone-keypad {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 5px;
    align-items: center;
    justify-content: center;
}

#phone-screen .keypad-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

#phone-screen .keypad-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(180deg, #F7F7F7 0%, #E5E5E5 100%);
    border: 1px solid #CCCCCC;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.1s ease;
}

#phone-screen .keypad-btn:active {
    transform: scale(0.9);
    filter: brightness(0.95);
}

#phone-screen .keypad-number {
    font-size: 22px;
    font-weight: 300;
    color: #333;
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

#phone-screen .keypad-letters {
    font-size: 7px;
    color: #666;
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
    margin-top: -3px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

#phone-screen .phone-call-actions {
    display: flex;
    justify-content: center;
    padding: 5px;
    flex-shrink: 0;
}

#phone-screen .call-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(180deg, #4CD964 0%, #2DBE4F 100%);
    border: 1px solid #2DBE4F;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.1s ease;
}

#phone-screen .call-button:active {
    transform: scale(0.9);
}

#phone-screen .call-icon {
    font-size: 22px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Calculator app specific styles (iOS 6 redesign) */
.calculator-content {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #4C566C;
}

.calc-display-container {
    height: 25%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 10px;
    padding-bottom: 5px;
}

.calc-display {
    color: white;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 200;
    font-size: 44px;
    text-align: right;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    transform: scale(1);
    transform-origin: right;
    transition: transform 0.1s ease-in-out;
}

.calculator-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 1px;
    background-color: #3b4354;
}

.calc-btn {
    border: none;
    font-size: 20px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    margin: 0;
    padding: 0;
    transition: filter 0.1s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), inset 0 -1px 0 rgba(0,0,0,0.1);
}

.calc-btn:active {
    filter: brightness(1.2);
}

.calc-btn.function {
    background: linear-gradient(180deg, #818a99, #6a7383);
    color: white;
    font-weight: 400;
}

.calc-btn.operator {
    background: linear-gradient(180deg, #f7ab48, #f59120);
    font-size: 24px;
}
.calc-btn.operator:active {
    background: linear-gradient(180deg, #f59120, #f7ab48);
}

.calc-btn.number {
    background: linear-gradient(180deg, #a0a7b4, #8d95a4);
    color: #3b4354;
    font-weight: 400;
}

.calc-btn.zero {
    grid-column: 1 / 3;
    justify-content: flex-start;
    padding-left: 15px;
}

/* YouTube App (iOS 6 Style) */
.youtube-content {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #1F1F1F;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.youtube-header-bar {
    height: 44px;
    background: linear-gradient(180deg, #5998df 0%, #3a7bd5 100%);
    border-bottom: 1px solid #2e61a4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-bottom: 1px solid #666;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.youtube-logo {
    height: 22px;
}

.youtube-segmented-control {
    display: flex;
    padding: 8px;
    background: #1F1F1F;
    flex-shrink: 0;
}

.youtube-segment {
    flex: 1;
    text-align: center;
    padding: 5px;
    font-size: 10px;
    font-weight: bold;
    color: white;
    text-shadow: 0 -1px 0 #000;
    background: linear-gradient(180deg, #444 0%, #222 100%);
    border: 1px solid #111;
    cursor: pointer;
}

.youtube-segment:first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    border-right: none;
}
.youtube-segment:last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.youtube-segment.active {
    background: linear-gradient(180deg, #2d60a2 0%, #20457b 100%);
}

.youtube-video-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 5px;
}

.youtube-video-cell {
    display: flex;
    padding: 5px;
    background: #E5E5E5;
    border-radius: 5px;
    margin-bottom: 5px;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.5);
    border: 1px solid #555;
}

.video-thumbnail {
    width: 60px;
    height: 45px;
    background-color: #ccc;
    background-image: url('https://source.unsplash.com/random/120x90?music');
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    flex-shrink: 0;
    position: relative;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail.cat-video {
    background-image: url('https://source.unsplash.com/random/120x90?cat');
}

.video-thumbnail.space-video {
    background-image: url('https://source.unsplash.com/random/120x90?space');
}

.play-button-overlay {
    width: 24px;
    height: 24px;
    opacity: 0.8;
}

.video-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.video-title {
    font-size: 11px;
    font-weight: bold;
}

.video-details {
    font-size: 9px;
    color: #666;
}

.progress-bar-container {
    height: 3px;
    background: #bbb;
    border-radius: 1.5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #CC181E;
    border-radius: 1.5px;
}

.youtube-bottom-toolbar {
    height: 40px;
    background: linear-gradient(180deg, #d4d4d4 0%, #b8b8b8 100%);
    border-top: 1px solid #999;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-shrink: 0;
}

.youtube-toolbar-item {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.youtube-toolbar-item img {
    height: 24px;
}

.tab-count {
    position: absolute;
    font-size: 10px;
    color: #666;
    text-shadow: 0 1px 0 white;
}

/* Messages App (iOS 6 Style) */
.messages-content {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #f0f0f0;
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
}

.message-thread-view {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.messages-header-bar {
    height: 44px;
    background: linear-gradient(180deg, #5998df 0%, #3a7bd5 100%);
    border-bottom: 1px solid #2e61a4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 1px 2px rgba(0,0,0,0.2);
}

.messages-title {
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 -1px 0 rgba(0,0,0,0.4);
}

.messages-title.thread-title {
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 5px;
}

.messages-edit-btn, .messages-back-btn, .thread-contact-btn {
    background: linear-gradient(180deg, #4e8ad0 0%, #3a74bb 100%);
    border: 1px solid #2d5a99;
    border-radius: 5px;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 5px 8px;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(0,0,0,0.1);
    text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
}

.messages-back-btn {
    padding-left: 5px;
}

.messages-new-btn {
    width: 24px;
    height: 24px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M20.71,7.04C21.1,6.65,21.1,6,20.71,5.63L18.37,3.29C18,2.9,17.35,2.9,16.96,3.29L15.13,5.12L18.88,8.87M3,17.25V21H6.75L17.81,9.94L14.06,6.19L3,17.25Z"></path></svg>') no-repeat center center;
    background-size: 16px 16px;
    border: none;
    opacity: 0.8;
}

.messages-list {
    flex: 1;
    overflow-y: auto;
}

.conversation-cell {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    background: white;
    border-bottom: 1px solid #C8C7CC;
    cursor: pointer;
}

.conversation-cell:active {
    background: #E5E5E5;
}

.cell-content {
    flex: 1;
    min-width: 0;
}

.contact-name {
    font-size: 11px;
    font-weight: bold;
    color: #000;
}

.message-preview {
    font-size: 9px;
    color: #8E8E93;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cell-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #3875D7;
}

.timestamp {
    font-size: 9px;
}

.cell-meta .disclosure-indicator {
    font-size: 12px;
    color: #C7C7CC;
}

.message-bubbles-container {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message-bubble {
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 75%;
    font-size: 11px;
    line-height: 1.3;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.message-bubble.received {
    background: #E5E5E5;
    color: #000;
    align-self: flex-start;
    border: 1px solid #DCDCDC;
}

.message-bubble.sent {
    background: linear-gradient(180deg, #53d369 0%, #29be41 100%);
    color: white;
    align-self: flex-end;
    border: 1px solid #23a638;
    text-shadow: 0 -1px 0 rgba(0,0,0,0.1);
}

.message-input-area {
    height: 38px;
    background: linear-gradient(180deg, #d7d7d7 0%, #b8b8b8 100%);
    border-top: 1px solid #999;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 5px;
    gap: 5px;
}

.message-input-area input {
    flex: 1;
    height: 24px;
    border: 1px solid #a4a4a4;
    border-radius: 14px;
    padding: 0 10px;
    font-size: 11px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
}

.message-input-area button {
    background: linear-gradient(180deg, #5998df 0%, #3a7bd5 100%);
    border: 1px solid #2e61a4;
    border-radius: 5px;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 4px 8px;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(0,0,0,0.1);
    text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
}

/* Mail App (iOS 6 Style) */
.mail-content {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #E1E4E7;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 1px,
            rgba(0,0,0,0.02) 1px,
            rgba(0,0,0,0.02) 2px
        );
}

.mail-list-view, .mail-detail-view {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mail-header-bar {
    height: 44px;
    background: linear-gradient(180deg, #5998df 0%, #3a7bd5 100%);
    border-bottom: 1px solid #2e61a4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.mail-title {
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 -1px 0 rgba(0,0,0,0.4);
}

.mail-edit-btn, .mail-back-btn {
    background: linear-gradient(180deg, #4e8ad0 0%, #3a74bb 100%);
    border: 1px solid #2d5a99;
    border-radius: 5px;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 5px 8px;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(0,0,0,0.1);
    text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
}

.mail-back-btn {
    padding-left: 5px;
}

.mail-compose-btn {
    width: 24px;
    height: 24px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M20.71,7.04C21.1,6.65,21.1,6,20.71,5.63L18.37,3.29C18,2.9,17.35,2.9,16.96,3.29L15.13,5.12L18.88,8.87M3,17.25V21H6.75L17.81,9.94L14.06,6.19L3,17.25Z"></path></svg>') no-repeat center center;
    background-size: 16px 16px;
    border: none;
    opacity: 0.8;
}

.mail-search-bar {
    padding: 8px 10px;
    background: #C7CDD4;
    border-bottom: 1px solid #B2B2B2;
}

.mail-search-bar input {
    width: 100%;
    height: 28px;
    border-radius: 14px;
    border: 1px solid #BDBDBD;
    background-color: #E5E5E5;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 12px;
    color: #333;
    padding: 0 10px 0 28px;
    outline: none;
}

.mail-list {
    flex: 1;
    overflow-y: auto;
    background: white;
}

.mail-item {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    padding: 8px 10px;
    border-bottom: 1px solid #E1E1E1;
    cursor: pointer;
    position: relative;
}

.mail-item:active {
    background: #E5E5E5;
}

.mail-sender {
    grid-column: 1 / 2;
    font-weight: bold;
    font-size: 12px;
}

.mail-time {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    font-size: 10px;
    color: #3875D7;
}

.mail-subject {
    grid-column: 1 / 2;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mail-preview {
    grid-column: 1 / 3;
    font-size: 10px;
    color: #8E8E93;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mail-meta {
    grid-column: 2 / 3;
    grid-row: 1 / 4;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mail-meta .disclosure-indicator {
    color: #C7C7CC;
}

.mail-nav-arrows {
    display: flex;
    gap: 5px;
}

.mail-nav-arrows button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    font-weight: bold;
    opacity: 0.7;
    cursor: pointer;
}

.mail-detail-header {
    background: white;
    padding: 10px;
    border-bottom: 1px solid #E1E1E1;
    font-size: 10px;
}

.mail-detail-subject {
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 8px;
}
.mail-detail-from, .mail-detail-to {
    color: #666;
    margin-bottom: 2px;
}

.mail-detail-body {
    padding: 10px;
    font-size: 11px;
    line-height: 1.5;
    flex: 1;
    overflow-y: auto;
}

/* iPod App (iOS 6 Style) */
.ipod-content {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #1c1c1c;
}

.ipod-main-view, .ipod-now-playing-view {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ipod-header-bar {
    height: 44px;
    background: linear-gradient(180deg, #5c5c5c 0%, #2b2b2b 100%);
    border-bottom: 1px solid #111;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}

.ipod-title {
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 -1px 0 #000;
}

.ipod-back-btn {
    background: linear-gradient(180deg, #444 0%, #222 100%);
    border: 1px solid #111;
    border-radius: 5px;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 5px 8px;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(255,255,255,0.1);
    text-shadow: 0 -1px 0 #000;
    position: absolute;
    left: 10px;
}

.ipod-segmented-control {
    display: flex;
    padding: 8px;
    background: #1c1c1c;
    flex-shrink: 0;
}

.ipod-segment {
    flex: 1;
    text-align: center;
    padding: 5px;
    font-size: 10px;
    font-weight: bold;
    color: white;
    text-shadow: 0 -1px 0 #000;
    background: linear-gradient(180deg, #444 0%, #222 100%);
    border: 1px solid #111;
    cursor: pointer;
}

.ipod-segment:first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    border-right: none;
}
.ipod-segment:last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.ipod-segment.active {
    background: linear-gradient(180deg, #2d60a2 0%, #20457b 100%);
}

.ipod-song-list {
    flex: 1;
    overflow-y: auto;
}

.ipod-song-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    color: white;
    border-bottom: 1px solid #333;
    cursor: pointer;
}

.ipod-song-item.selected {
    background: #4CD964;
}
.ipod-song-item.selected .song-artist {
    color: white;
}

.song-info .song-title {
    font-size: 11px;
    font-weight: bold;
}
.song-info .song-artist {
    font-size: 10px;
    color: #999;
}

.ipod-now-playing-view {
    background: #1c1c1c;
}

.now-playing-content {
    flex: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.album-art-container {
    position: relative;
    align-self: center;
}
.album-art {
    width: 120px;
    height: 120px;
    background: url('https://source.unsplash.com/random/240x240?rock,albumart') center/cover;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
.album-art-reflection {
    width: 120px;
    height: 40px;
    background: url('https://source.unsplash.com/random/240x240?rock,albumart') center/cover;
    transform: scaleY(-1);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.5) 30%, #000 50%, rgba(0,0,0,.5) 70%);
    -webkit-mask-size: 200%;
    animation: shine 2s linear infinite;
}

.track-info {
    text-align: center;
    color: white;
}
.track-title {
    font-size: 12px;
    font-weight: bold;
}
.track-artist {
    font-size: 10px;
    color: #999;
}

.scrubber {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #999;
    font-size: 10px;
}
.scrubber-bar {
    flex: 1;
    height: 6px;
    background: #555;
    border-radius: 3px;
    overflow: hidden;
}
.scrubber-progress {
    height: 100%;
    background: #4CD964;
    border-radius: 3px;
}

.playback-controls {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.playback-controls button {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    cursor: pointer;
}

.prev-btn {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M6,6H8V18H6V6M9.5,12L18,18V6L9.5,12Z" /></svg>');
}
.play-pause-btn.play {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M8,5.14V19.14L19,12.14L8,5.14Z" /></svg>');
}
.play-pause-btn.pause {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M14,19H18V6H14M6,19H10V6H6V19Z" /></svg>');
}
.next-btn {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M16,18H18V6H16V18M6,18L14.5,12L6,6V18Z" /></svg>');
}

/* Safari App (iOS 6 Style) */
.safari-content {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #C7CDD4;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 1px,
            rgba(0,0,0,0.02) 1px,
            rgba(0,0,0,0.02) 2px
        );
}

.safari-top-bar {
    height: 38px;
    background: linear-gradient(180deg, #5998df 0%, #3a7bd5 100%);
    border-bottom: 1px solid #2e61a4;
    display: flex;
    align-items: center;
    padding: 5px;
    gap: 5px;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.safari-nav-buttons {
    display: flex;
    gap: 1px;
}

.safari-nav-btn {
    background: linear-gradient(180deg, #4e8ad0 0%, #3a74bb 100%);
    border: 1px solid #2d5a99;
    color: white;
    font-size: 18px;
    font-weight: 300;
    width: 30px;
    height: 28px;
    line-height: 24px;
    cursor: pointer;
    text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
}
.safari-nav-btn.back {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}
.safari-nav-btn.forward {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}
.safari-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.safari-url-bar {
    flex: 1;
    background: white;
    height: 28px;
    border-radius: 5px;
    border: 1px solid #999;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    padding: 0;
}

#safari-url-input {
    flex: 1;
    height: 100%;
    border: none;
    background: transparent;
    padding: 0 8px;
    font-size: 11px;
    color: #333;
    outline: none;
}

.safari-reload-icon, .safari-stop-icon {
    font-size: 16px;
    color: #007aff;
    cursor: pointer;
    padding: 0 8px;
    height: 100%;
    display: flex;
    align-items: center;
    border-left: 1px solid #ccc;
}

.safari-stop-icon {
    font-weight: bold;
    font-size: 18px;
}

.safari-webpage-container {
    flex: 1;
    position: relative;
    background: white;
    overflow: hidden;
}

.safari-startpage {
    padding: 8px;
    height: 100%;
    width: 100%;
    position: absolute;
    display: block;
}

#safari-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: none;
    background: white;
}

.google-logo {
    text-align: center;
    font-size: 28px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    margin-top: 10px;
    margin-bottom: 15px;
}
.g-blue { color: #4285F4; }
.o-red { color: #EA4335; }
.o-yellow { color: #FBBC05; }
.l-green { color: #34A853; }
.e-red { color: #EA4335; }

.google-search-box {
    display: flex;
    margin-bottom: 10px;
}
.google-search-box input {
    flex: 1;
    height: 28px;
    border: 1px solid #ccc;
    border-right: none;
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
    padding: 0 8px;
    font-size: 11px;
    outline: none;
}
.google-search-btn {
    width: 30px;
    height: 28px;
    border: 1px solid #ccc;
    background: #f1f1f1;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.magnifying-glass {
    width: 10px;
    height: 10px;
    border: 2px solid #666;
    border-radius: 50%;
    position: relative;
}
.magnifying-glass::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 6px;
    height: 2px;
    background: #666;
    transform: rotate(45deg);
}

.google-search-type {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-bottom: 8px;
}
.google-search-type button {
    background: none;
    border: none;
    font-size: 10px;
    color: #666;
}
.google-search-type button.active {
    font-weight: bold;
    color: #4285F4;
    border-bottom: 2px solid #4285F4;
}

.search-results {
    font-size: 9px;
}
.result-item {
    margin-bottom: 8px;
}
.result-title {
    color: #1a0dab;
    font-size: 11px;
    font-weight: 500;
}
.result-url {
    color: #006621;
}
.result-snippet {
    color: #545454;
}

.safari-bottom-toolbar {
    height: 40px;
    background: linear-gradient(180deg, #d4d4d4 0%, #b8b8b8 100%);
    border-top: 1px solid #999;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-shrink: 0;
}

.safari-toolbar-item {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.safari-toolbar-item img {
    height: 24px;
}

.tab-count {
    position: absolute;
    font-size: 10px;
    color: #666;
    text-shadow: 0 1px 0 white;
}

/* Flappy Bird App (iOS 6 Style) */
.flappybird-content {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: url('FBbackground.png') repeat-x bottom;
    background-size: auto 100%;
    position: relative;
    overflow: hidden;
    image-rendering: pixelated;
}

#flappybird-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#flappybird-score {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Press Start 2P', cursive;
    font-size: 24px;
    color: white;
    text-shadow: 2px 2px #000;
    z-index: 2;
}

#flappybird-menu, #flappybird-game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 3;
    background: rgba(0,0,0,0.2);
}

#flappybird-logo {
    width: 120px;
    image-rendering: pixelated;
}

#flappybird-play-btn, #flappybird-restart-btn {
    font-family: 'Press Start 2P', cursive;
    background: #DE7A23;
    color: white;
    padding: 8px 16px;
    border: 2px solid white;
    border-radius: 5px;
    box-shadow: 0 4px #000;
    cursor: pointer;
    font-size: 14px;
}

#flappybird-play-btn:active, #flappybird-restart-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px #000;
}

.game-over-banner, #flappybird-final-score {
    font-family: 'Press Start 2P', cursive;
    color: #DE7A23;
    text-shadow: 2px 2px white;
    font-size: 18px;
    text-align: center;
}

#flappybird-final-score {
    font-size: 14px;
    color: white;
    text-shadow: 1px 1px #000;
}

@keyframes shine {
    from { -webkit-mask-position: 150%; }
    to { -webkit-mask-position: -50%; }
}

/* Phone Contacts List Styles */
.contact-list {
    flex: 1;
    overflow-y: auto;
    background: white; /* Match messages app list background */
    padding-top: 5px; /* Add some padding at the top */
}

.contact-cell {
    display: flex;
    align-items: center;
    padding: 10px 15px; /* Slightly more padding than messages for phone */
    background: white;
    border-bottom: 1px solid #E1E1E1; /* Lighter border for contacts */
    cursor: pointer;
    justify-content: space-between; /* Ensure disclosure indicator is at the end */
}

.contact-cell:last-child {
    border-bottom: none; /* No border for the last item */
}

.contact-cell:active {
    background: #E5E5E5;
}

.contact-cell .cell-content {
    flex: 1;
    min-width: 0;
}

.contact-cell .contact-name {
    font-size: 17px; /* Larger font size for main contact name */
    font-weight: 400; /* Regular weight for names */
    color: #000;
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.contact-cell .cell-meta {
    display: flex;
    align-items: center;
    gap: 5px;
}

.contact-cell .disclosure-indicator {
    font-size: 18px; /* Larger disclosure indicator */
    color: #C7C7CC;
    font-weight: 300;
}

/* Clock App Styles */
#clock-screen {
    background: #1c1c1c; /* Dark background */
}

.clock-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 20px;
}

.clock-analog {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, #444 0%, #222 100%);
    border: 3px solid #666;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5), 0 5px 15px rgba(0,0,0,0.5);
}

.clock-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Add marks for clock face if desired */
    /* Example: background-image: radial-gradient(circle, transparent 95%, rgba(255,255,255,0.1) 96%); */
    border-radius: 50%;
    opacity: 0.1; /* Subtle overlay */
}

.center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background-color: #f0f0f0;
    border-radius: 50%;
    z-index: 10;
}

.hour-hand, .minute-hand, .second-hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    background-color: white;
    border-radius: 2px;
    z-index: 5;
    transition: transform 0.1s linear; /* Smooth hand movement */
}

.hour-hand {
    width: 4px;
    height: 30%;
    margin-left: -2px;
    background-color: #e0e0e0;
}

.minute-hand {
    width: 3px;
    height: 40%;
    margin-left: -1.5px;
    background-color: #f0f0f0;
}

.second-hand {
    width: 1px;
    height: 45%;
    margin-left: -0.5px;
    background-color: red;
    z-index: 6;
}

.clock-digital {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 200;
    font-size: 28px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Voice Memos App Styles */
#voice-memos-screen {
    background: linear-gradient(180deg, #5998df 0%, #3a7bd5 100%);
}

.voice-memos-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 15px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    font-size: 14px;
}

.record-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(180deg, #FF6961 0%, #C70039 100%); /* Red record button */
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    cursor: pointer;
    position: relative;
    transition: transform 0.1s ease;
}

.record-button:active {
    transform: scale(0.95);
}

.record-button::before {
    content: '●'; /* Record symbol */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 30px;
    line-height: 1;
}

.voice-memos-info {
    font-size: 12px;
    opacity: 0.8;
}

/* Compass App Styles */
#compass-screen {
    background: #222; /* Dark background for compass */
}

.compass-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 20px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    font-size: 14px;
}

.compass-rose {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, #444 0%, #222 100%);
    border: 3px solid #666;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5), 0 5px 15px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.compass-rose::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: white;
    border-radius: 50%;
    z-index: 10;
}

.needle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    transform-origin: bottom center;
    z-index: 8;
}

.needle.north {
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 55px solid red;
    top: -5px;
}

.needle.south {
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 55px solid #aaa;
    bottom: -5px;
}

.cardinal {
    position: absolute;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.cardinal.north { top: 8px; color: red; }
.cardinal.east { right: 8px; }
.cardinal.south { bottom: 8px; }
.cardinal.west { left: 8px; }

.compass-info {
    font-size: 12px;
    opacity: 0.8;
}