/* iPhone Mockup - CSS-based device frame */

.iphone-mockup {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    max-width: 100%;
    height: 100%;
}

/* iPhone Frame */
.iphone-frame {
    position: relative;
    width: 375px;
    height: 812px;
    /* Slightly multi-tonal shell for more realistic texture */
    background:
        radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.08) 0, transparent 40%),
        linear-gradient(145deg, #222222 0%, #050505 100%);
    border-radius: 50px;
    padding: 12px;
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.55),              /* main drop shadow */
        0 0 0 1px rgba(0, 0, 0, 0.85),                /* crisp outer edge */
        inset 0 1px 0 rgba(255, 255, 255, 0.18),      /* top inner highlight */
        inset 0 -1px 0 rgba(0, 0, 0, 0.85);           /* bottom inner edge */
    display: flex;
    flex-direction: column;
}

/* Subtle inner chamfer and edge separation */
.iphone-frame::before {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: inherit;
    pointer-events: none;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04),      /* thin inner highlight ring */
        inset 0 0 0 1px rgba(0, 0, 0, 0.5);       /* inner dark seam to screen */
}

/* Soft side sheen to suggest curved glass/metal edge */
.iphone-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        linear-gradient(to right,
            rgba(255, 255, 255, 0.08) 0,
            transparent 18%,
            transparent 82%,
            rgba(255, 255, 255, 0.06) 100%);
    opacity: 0.6;
    mix-blend-mode: screen;
}

/* iPhone Screen */
.iphone-screen {
    position: relative;
    flex: 1;
    background: #000;
    border-radius: 38px; /* outer radius (50) - padding (12) for even bezel at corners */
    overflow: hidden;
    /* Inner stroke / pixel gap just inside bezel (softened) */
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.7),             /* slightly stronger inner edge */
        inset 0 1px 2px rgba(255, 255, 255, 0.08), /* light top highlight */
        inset 0 -2px 4px rgba(0, 0, 0, 0.6),       /* softer bottom edge */
        inset 0 0 18px rgba(0, 0, 0, 0.45);        /* smaller, softer falloff */
    display: flex;
    flex-direction: column;
}

/* Overlay inner shadow above content so pixel edges are slightly covered */
.iphone-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow:
        inset 0 0 4px rgba(0, 0, 0, 0.2); /* tighter inner glow just at edges */
}

/* iPhone Notch - Hidden */
.iphone-notch {
    display: none;
}

/* iPhone Status Bar - Hidden */
.iphone-status-bar {
    display: none;
}

.status-time {
    display: none;
}

.status-icons {
    display: none;
}

/* iPhone Content (Scrollable) */
.iphone-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Custom scrollbar for iPhone */
.iphone-content::-webkit-scrollbar {
    width: 3px;
}

.iphone-content::-webkit-scrollbar-track {
    background: transparent;
}

.iphone-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
}

/* Image inside iPhone */
.iphone-content img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
}

/* iPhone Home Indicator - Hidden */
.iphone-home-indicator {
    display: none;
}

.home-indicator-bar {
    display: none;
}

/* Responsive: Smaller iPhone on smaller screens */
@media (max-width: 900px) {
    .iphone-frame {
        width: 300px;
        height: 650px;
        border-radius: 40px;
        padding: 10px;
    }

    .iphone-screen {
        border-radius: 30px; /* 40 - 10 padding */
    }

    .iphone-notch {
        width: 170px;
        height: 24px;
        border-radius: 0 0 24px 24px;
    }

    .iphone-status-bar {
        height: 36px;
        padding: 6px 12px;
        font-size: 11px;
    }

    .home-indicator-bar {
        width: 100px;
        height: 3px;
    }
}

/* Responsive: Tablet/Mobile view */
@media (max-width: 768px) {
    .iphone-frame {
        width: 280px;
        height: 600px;
        border-radius: 35px;
        padding: 8px;
    }

    .iphone-screen {
        border-radius: 27px; /* 35 - 8 padding */
    }

    .iphone-notch {
        width: 150px;
        height: 22px;
        border-radius: 0 0 20px 20px;
    }

    .iphone-status-bar {
        height: 32px;
        padding: 4px 10px;
        font-size: 10px;
    }
}

/* Light theme adjustments */
[data-theme="light"] .iphone-frame {
    background:
        radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.45) 0, transparent 40%),
        linear-gradient(145deg, #f0f0f3 0%, #d4d4d8 100%);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.22);
}

[data-theme="light"] .iphone-screen {
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.06),
        inset 0 1px 2px rgba(255, 255, 255, 0.2),
        inset 0 -2px 3px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Loading state */
.iphone-frame.loading .iphone-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.iphone-frame.loading .iphone-content::after {
    content: "Loading...";
    color: var(--color-text-secondary);
    font-size: 14px;
}

