.iframe-overlay {
    position: absolute;
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    filter: saturate(0.8) brightness(0.95) blur(2px);
    will-change: transform, opacity, filter;
    transform-origin: center;
    overflow: hidden;
    opacity: 0.7;
    transform: translateZ(-100px) rotateX(3deg);
}
.iframe-overlay.active {
    opacity: 1;
    filter: saturate(1) brightness(1) blur(0px);
    transform: translateZ(0) rotateX(0deg);
    box-shadow: 0 30px 60px -15px rgba(0,0,0,0.25);
}
.split-screen-btn {
    background: rgba(255,255,255,0.95);
    border: none;
    border-radius: 12px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    opacity: 0;
    transform: translateY(10px) translateZ(-50px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.acOpen {
     padding: 10px !important;
    border: 1px solid rgba(205, 205, 205, 0.4) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
    
.iframe-overlay.active .split-screen-btn {
    opacity: 1;
    transform: translateY(0) translateZ(0);
}
.split-screen-btn:hover {
    background: rgba(255,255,255,1);
    transform: scale(1.05) translateZ(10px) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.links-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95) translateZ(-100px);
    background: rgba(255, 255, 255, 0.98);
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    z-index: 1002;
    opacity: 0;
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    perspective: 1000px;
}


.links-modal.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) translateZ(0);
    pointer-events: auto;
}
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.link-card {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.link-card:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
}
.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}
.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.split-container {
   display: flex;
    gap: 16px;
    height: 100%;
    background: rgb(255 255 255 / 80%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.split-iframe {
    border: 1px solid #eee;
    flex: 1;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.iframe-overlay iframe {
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0;
    transform: scale(0.98) translateY(10px) translateZ(-20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
    filter: blur(2px);
}
.iframe-overlay.active iframe {
    opacity: 1;
    transform: scale(1) translateY(0) translateZ(0);
    filter: blur(0px);
}
.iframe-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1001;
    transform-style: preserve-3d;
}
.iframe-close,
.iframe-pin {
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    opacity: 0;
    transform: scale(0.9) rotate(-90deg) translateZ(-30px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.iframe-overlay.active .iframe-close,
.iframe-overlay.active .iframe-pin {
    opacity: 1;
    transform: scale(1) rotate(0deg) translateZ(0);
}
.iframe-close:hover,
.iframe-pin:hover {
    background: rgba(255,255,255,1);
    transform: scale(1.1) translateZ(20px) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.iframe-pin.pinned {
    background: rgba(99, 102, 241, 0.1);
    color: rgb(99, 102, 241);
}
.iframe-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(52, 152, 219, 0.1);
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
.link-highlight {
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform-style: preserve-3d;
}
.link-highlight::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: -1;
    height: 100%;
    background: rgba(99, 102, 241, 0.1);
    border-radius: inherit;
    transform: scale(0) translateZ(-10px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.link-highlight:hover::after {
    transform: scale(1) translateZ(0);
    opacity: 1;
}
.link-highlight:hover {
    transform: translateY(-2px) translateZ(10px);
}
.floating-window {
    position: relative !important;
    margin: 1rem;
    width: calc(100% - 2rem) !important;
    height: 400px !important;
    transition: none !important;
}
.dark {
    .iframe-overlay {
        background: rgba(17, 17, 17, 0.95);
        box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    }
    .split-iframe {
        border-color: rgba(255, 255, 255, 0.1);
        background: rgba(17, 17, 17, 0.95);
    }
    .iframe-controls button {
        background: rgba(17, 17, 17, 0.9);
        color: rgba(255, 255, 255, 0.9);
    }
    .iframe-controls button:hover {
        background: rgba(17, 17, 17, 1);
    }
}