* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ecf0f1;
    overflow: hidden;
}

.demo-header {
    background: #2c3e50;
    color: white;
    padding: 10px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    height: 60px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
    height: 100%;
}

.left-section h1 {
    font-size: 22px;
    font-weight: 600;
}

.center-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.device-switcher {
    display: flex;
    gap: 5px;
    background: #34495e;
    padding: 5px;
    border-radius: 8px;
}

.device-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: #bdc3c7;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.device-btn:hover {
    background: #2c3e50;
    color: white;
}

.device-btn.active {
    background: #3498db;
    color: white;
}

.device-btn svg {
    width: 18px;
    height: 18px;
}

.tooltip {
    position: relative;
}

.tooltip .tooltiptext {
visibility: hidden;
width: 140px;
background-color: #1a252f;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 8px;
position: absolute;
z-index: 1001;
top: 125%;
left: 50%;
margin-left: -70px;
opacity: 0;
transition: opacity 0.3s;
font-size: 12px;
white-space: nowrap;
}

.tooltip .tooltiptext::after {
content: "";
position: absolute;
bottom: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: transparent transparent #1a252f transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.orientation-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    background: #34495e;
    color: #bdc3c7;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.orientation-toggle:hover {
    background: #2c3e50;
    color: white;
}

.orientation-toggle.active {
    background: #e67e22;
    color: white;
}

.right-section {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-download {
    background: #27ae60;
    color: white;
}

.btn-download:hover {
    background: #229954;
}

.btn-fullscreen {
    background: #9b59b6;
    color: white;
}

.btn-fullscreen:hover {
    background: #8e44ad;
}

.preview-container {
    margin-top: 60px;
    height: calc(100vh - 70px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    overflow: hidden;
}

.iframe-wrapper {
    background: white;
    box-shadow: none;
    border-radius: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.iframe-wrapper.desktop {
    width: 100%;
    max-width: 100%;
}

.iframe-wrapper.tablet {
    width: 768px;
    height: 1024px;
}

.iframe-wrapper.tablet.landscape {
    width: 1024px;
    height: 768px;
}

.iframe-wrapper.mobile {
    width: 375px;
    height: 667px;
}

.iframe-wrapper.mobile.landscape {
    width: 667px;
    height: 375px;
}

#demoFrame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.iframe-wrapper:fullscreen {
    background: #ecf0f1;
    padding: 20px;
}

.iframe-wrapper:-webkit-full-screen {
    background: #ecf0f1;
    padding: 20px;
}

.iframe-wrapper:-moz-full-screen {
    background: #ecf0f1;
    padding: 20px;
}

@media (max-width: 900px) {
    .demo-header {
        height: 50px;
        padding: 8px 10px;
    }
    .header-content {
        flex-direction: row;
        gap: 5px;
        flex-wrap: nowrap;
    }
    .left-section h1 {
        font-size: 14px;
        white-space: nowrap;
    }
    .device-switcher {
        padding: 3px;
        gap: 3px;
    }
    .device-btn {
        padding: 6px 10px;
        font-size: 0;
        gap: 0;
    }
    .device-btn svg {
        width: 16px;
        height: 16px;
        margin: 0;
    }
    .orientation-toggle {
        padding: 6px 8px;
        font-size: 0;
    }
    .btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    .preview-container {
        margin-top: 50px;
        height: calc(100vh - 50px);
    }
}

@media (max-width: 600px) {
    .demo-header {
        height: 45px;
        padding: 5px 8px;
    }
    .left-section h1 {
        font-size: 12px;
    }
    .device-btn {
        padding: 5px 8px;
    }
    .device-btn svg {
        width: 14px;
        height: 14px;
    }
    .orientation-toggle {
        padding: 5px 6px;
    }
    .btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    .preview-container {
        margin-top: 45px;
        height: calc(100vh - 45px);
    }
}