/* Mobile Device Frame Styling */
/* Matches space theme from demo.html with black background and gold accents */

.device-frame-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px 25px;
    transform: scale(1.05);
    transform-origin: center center;
}

/* Device Selector Buttons */
.device-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.device-btn {
    padding: 10px 24px;
    background: rgba(253, 189, 75, 0.1);
    border: 2px solid rgba(253, 189, 75, 0.3);
    color: #FDBD4B;
    border-radius: 22px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.device-btn:hover {
    background: rgba(253, 189, 75, 0.2);
    border-color: rgba(253, 189, 75, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(253, 189, 75, 0.3);
}

.device-btn.active {
    background: rgba(253, 189, 75, 0.25);
    border-color: #FDBD4B;
    box-shadow: 0 0 30px rgba(253, 189, 75, 0.4);
}

/* Base Device Frame */
.device-frame {
    position: relative;
    width: 420px;
    height: 880px;
    background: linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 50%, #0a0a0a 100%);
    border-radius: 46px;
    padding: 14px;
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.6),
        0 10px 30px rgba(0, 0, 0, 0.4),
        0 0 0 3px #0a0a0a,
        0 0 0 4px #1f1f1f,
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
    animation: floatDevice 4s ease-in-out infinite;
    transition: all 0.5s ease;
    border: 1px solid #0a0a0a;
}

/* iPhone side buttons - Power button */
.device-frame.iphone .power-button {
    position: absolute;
    right: -2px;
    top: 180px;
    width: 4px;
    height: 80px;
    background: linear-gradient(90deg, #0a0a0a 0%, #2a2a2a 50%, #0a0a0a 100%);
    border-radius: 0 2px 2px 0;
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.8);
}

/* Volume buttons */
.device-frame.iphone .volume-up {
    position: absolute;
    left: -2px;
    top: 140px;
    width: 4px;
    height: 50px;
    background: linear-gradient(270deg, #0a0a0a 0%, #2a2a2a 50%, #0a0a0a 100%);
    border-radius: 2px 0 0 2px;
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.8);
}

.device-frame.iphone .volume-down {
    position: absolute;
    left: -2px;
    top: 200px;
    width: 4px;
    height: 50px;
    background: linear-gradient(270deg, #0a0a0a 0%, #2a2a2a 50%, #0a0a0a 100%);
    border-radius: 2px 0 0 2px;
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.8);
}

.device-frame.iphone .mute-switch {
    position: absolute;
    left: -2px;
    top: 100px;
    width: 4px;
    height: 30px;
    background: linear-gradient(270deg, #0a0a0a 0%, #2a2a2a 50%, #0a0a0a 100%);
    border-radius: 2px 0 0 2px;
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.8);
}

/* iPhone Frame with Notch - Dynamic Island style */
.device-frame.iphone::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 35px;
    background: #000;
    border-radius: 20px;
    z-index: 15;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Camera and sensors in notch */
.device-frame.iphone::after {
    content: '';
    position: absolute;
    top: 26px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #1a3a5a 0%, #0a1a2a 70%, #000 100%);
    border-radius: 50%;
    z-index: 16;
    box-shadow:
        0 0 3px rgba(100, 150, 200, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

/* Android Frame - More rounded, no notch */
.device-frame.android {
    border-radius: 30px;
    padding: 10px;
}

.device-frame.android .device-screen {
    border-radius: 25px;
}

/* Device Screen */
.device-screen {
    width: 100%;
    height: 100%;
    border-radius: 36px;
    overflow: hidden;
    background: #000;
    position: relative;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Home indicator bar (for modern iPhones) */
.device-frame.iphone .home-indicator {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    z-index: 20;
}

/* Antenna lines for realism */
.device-frame.iphone .antenna-top {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.3) 20%, rgba(0, 0, 0, 0.3) 80%, transparent 100%);
}

.device-frame.iphone .antenna-bottom {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.3) 20%, rgba(0, 0, 0, 0.3) 80%, transparent 100%);
}

/* Loading State */
.device-screen.loading::before {
    content: 'Loading App...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FDBD4B;
    font-family: 'Nunito', sans-serif;
    font-size: 18px;
    font-weight: 600;
    z-index: 100;
}

.device-screen.loading::after {
    content: '';
    position: absolute;
    top: calc(50% + 40px);
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(253, 189, 75, 0.2);
    border-top-color: #FDBD4B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 100;
}

/* iframe Container */
.device-screen iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

/* Device Info */
.device-info {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Nunito', sans-serif;
    margin-top: 15px;
}

.device-info p {
    font-size: 16px;
    font-weight: 600;
    color: #FDBD4B;
    margin-bottom: 6px;
}

.device-info small {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* Animations */
@keyframes floatDevice {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes spin {
    to {
        transform: translateX(-50%) rotate(360deg);
    }
}

/* Hover effect - subtle lift */
.device-frame:hover {
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.7),
        0 15px 40px rgba(0, 0, 0, 0.5),
        0 0 0 3px #0a0a0a,
        0 0 0 4px #2a2a2a,
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
    animation: none;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .device-frame-container {
        transform: scale(0.79);
    }
}

@media (max-width: 1200px) {
    .device-frame-container {
        transform: scale(0.74);
    }
}

@media (max-width: 768px) {
    .device-frame-container {
        padding: 5px;
        transform: scale(0.5);
    }

    .device-selector {
        gap: 8px;
    }

    .device-btn {
        padding: 6px 15px;
        font-size: 10px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .device-frame-container {
        transform: scale(0.45);
    }
}

/* Error State */
.device-screen.error::before {
    content: 'Failed to load app';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff6b6b;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    z-index: 100;
}

.device-screen.error::after {
    content: 'Please refresh the page';
    position: absolute;
    top: calc(50% + 30px);
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    z-index: 100;
}
