/* Modern Device Styling */
.device {
    width: 200px;
    height: 400px;
    background: var(--device-color);
    border-radius: 30px;
    position: absolute;
    top: 50%;
    box-shadow:
        0 25px 50px var(--device-shadow),
        0 10px 20px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px var(--device-border),
        inset 0 0 0 3px var(--device-highlight);
    padding: 6px;
    transform-style: preserve-3d;
    transform: translateY(-50%);
    transition: transform 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
    overflow: visible;
}

/* Dynamic Island */
.device-notch {
    position: absolute;
    width: 25%;
    height: 20px;
    background: #f8f9fa;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 20px;
    z-index: 10;
}

/* Device Buttons */
.device-button {
    position: absolute;
    background: var(--device-color);
    border-radius: 2px;
    z-index: 5;
}

.button-volume-up {
    width: 3px;
    height: 30px;
    left: -3px;
    top: 90px;
}

.button-volume-down {
    width: 3px;
    height: 30px;
    left: -3px;
    top: 130px;
}

.button-power {
    width: 3px;
    height: 30px;
    right: -3px;
    top: 100px;
}

/* Action button (new on iPhone 15 Pro) */
.button-action {
    width: 12px;
    height: 12px;
    left: -6px;
    top: 180px;
    border-radius: 50%;
    background: #f1283c;
    box-shadow: 
        inset 0 0 0 1px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Device Positioning */
.device-left {
    left: 15%;
    transform: translateY(-50%) rotate3d(0.2, -0.1, 0.1, 10deg);
    animation: floatLeft var(--float-duration) ease-in-out infinite;
}

.device-right {
    right: 15%;
    transform: translateY(-50%) rotate3d(0.2, 0.1, -0.1, 10deg);
    animation: floatRight var(--float-duration) ease-in-out infinite;
}

/* Device Screen */
.device-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--screen-bg-start), var(--screen-bg-end));
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* App Interface */
.app-interface {
    width: 100%;
    height: 100%;
    background: var(--app-bg);
    display: flex;
    flex-direction: column;
}

.app-header {
    background: var(--app-header);
    padding: 45px 15px 15px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.app-status-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 5px;
}

.status-time {
    font-size: 12px;
    font-weight: 600;
    color: var(--app-text);
}

.status-icons {
    display: flex;
    gap: 5px;
}

.status-icon {
    width: 15px;
    height: 15px;
    background-size: contain;
    background-repeat: no-repeat;
}

.wifi-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231d1d1f'%3E%3Cpath d='M12 21l-1.5-1.5C14.3 15.8 18 12 18 8.5c0-3.5-2.5-6-5.5-6S7 5 7 8.5c0 3.5 3.7 7.3 7.5 11L12 21zm0-14.5c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2z'/%3E%3C/svg%3E");
}

.battery-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231d1d1f'%3E%3Cpath d='M15.67 4H14V3c0-.55-.45-1-1-1h-2c-.55 0-1 .45-1 1v1H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4z'/%3E%3C/svg%3E");
}

.app-title {
    font-weight: 600;
    font-size: 17px;
    color: var(--app-text);
    text-align: center;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .animation-container {
        height: 400px;
        perspective: none;
        order: 2; /* Move animation below content on mobile */
    }

    .file-transfer-animation {
        transform-style: flat;
        perspective: none;
    }

    .transfer-path {
        width: 30% !important;
    }

    .col-lg-6 {
        display: flex;
        flex-direction: column;
    }

    .hero-stats {
        order: 1; /* Keep stats above animation */
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .animation-container {
        height: 300px;
    }

    .transfer-path {
        width: 25% !important;
    }

    .device {
        transform: scale(0.8) translateY(-50%);
    }

    .device-left {
        left: 10%;
    }

    .device-right {
        right: 10%;
    }
}

/* Float Animations */
@keyframes floatLeft {
    0%, 100% {
        transform: translateY(-50%) rotate3d(0.2, -0.1, 0.1, 10deg) translateZ(0);
    }
    50% {
        transform: translateY(-55%) rotate3d(0.2, -0.1, 0.1, 10deg) translateZ(10px);
    }
}

@keyframes floatRight {
    0%, 100% {
        transform: translateY(-50%) rotate3d(0.2, 0.1, -0.1, 10deg) translateZ(0);
    }
    50% {
        transform: translateY(-55%) rotate3d(0.2, 0.1, -0.1, 10deg) translateZ(10px);
    }
}

/* Hover Effects */
.device:hover {
    transform: translateY(-52%) rotate3d(0, 0, 0, 0deg) scale(1.02);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.2),
        0 15px 30px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px rgba(0, 0, 0, 0.1),
        inset 0 0 0 3px rgba(255, 255, 255, 0.9);
    z-index: 10;
    animation-play-state: paused;
}