/* Demo Block Styles */
.ctb-demo-block {
    margin: 30px 0;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    background: var(--ctb-color-background-body, white);
}

.ctb-demo-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--ctb-color-text-primary, #333);
}

.ctb-demo-description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: var(--ctb-color-text-body, #666);
}

.ctb-demo-button {
    background: var(--ctb-color-primary, #0073aa);
    color: var(--ctb-text-on-primary, white);
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px;
}

.ctb-demo-button:hover {
    background: color-mix(in srgb, var(--ctb-color-primary, #0073aa) 85%, black);
    color: var(--ctb-text-on-primary, white);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px color-mix(in srgb, var(--ctb-color-primary, #0073aa) 30%, transparent);
}

.ctb-demo-close {
    background: var(--ctb-color-danger, #dc3545);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.ctb-demo-close:hover {
    background: color-mix(in srgb, var(--ctb-color-danger, #dc3545) 85%, black);
}

/* Style Variations */
.ctb-demo-primary {
    background: linear-gradient(135deg, var(--ctb-color-primary, #0073aa), color-mix(in srgb, var(--ctb-color-primary, #0073aa) 80%, black));
    color: var(--ctb-text-on-primary, white);
}

.ctb-demo-primary .ctb-demo-title,
.ctb-demo-primary .ctb-demo-description {
    color: var(--ctb-text-on-primary, white);
}

.ctb-demo-primary:hover {
    background: linear-gradient(135deg, color-mix(in srgb, var(--ctb-color-primary, #0073aa) 90%, white), var(--ctb-color-primary, #0073aa));
    box-shadow: 0 8px 25px color-mix(in srgb, var(--ctb-color-primary, #0073aa) 30%, transparent);
    transform: translateY(-4px);
}

.ctb-demo-secondary {
    background: linear-gradient(135deg, var(--ctb-color-success, #28a745), color-mix(in srgb, var(--ctb-color-success, #28a745) 80%, black));
    color: white;
}

.ctb-demo-secondary .ctb-demo-title,
.ctb-demo-secondary .ctb-demo-description {
    color: white;
}

.ctb-demo-secondary:hover {
    background: linear-gradient(135deg, color-mix(in srgb, var(--ctb-color-success, #28a745) 90%, white), var(--ctb-color-success, #28a745));
    box-shadow: 0 8px 25px color-mix(in srgb, var(--ctb-color-success, #28a745) 30%, transparent);
    transform: translateY(-4px);
}

.ctb-demo-modern {
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--ctb-color-primary, #667eea) 90%, white), 
    color-mix(in srgb, var(--ctb-color-gradient-to, #764ba2) 90%, white)
    );
    border: 1px solid color-mix(in srgb, var(--ctb-color-primary, #667eea) 30%, transparent);
}

.ctb-demo-minimal {
    background: var(--ctb-color-background-body, white);
    border: 2px solid var(--ctb-color-secondary, #e0e0e0);
    box-shadow: none;
}

.ctb-demo-tech {
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--ctb-color-info, #17a2b8) 20%, var(--ctb-color-dark, #1e1e1e)), 
        var(--ctb-color-dark, #2d2d2d)
    );
    color: white;
    border: 2px solid var(--ctb-color-info, #17a2b8);
}

.ctb-demo-tech .ctb-demo-title,
.ctb-demo-tech .ctb-demo-description {
    color: white;
}

/* New image container that takes full space */
.ctb-demo-image-container {
    position: relative;
    width: 100%;
    min-height: 300px;
    overflow: hidden;
    /* Height is set via inline style from previewHeight attribute */
}

.ctb-demo-preview {
    position: relative;
    background: #000;
    margin: 0;
    width: 100%;
    height: 100%;
}

.ctb-demo-preview iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}

.ctb-demo-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 20px;
    text-align: center;
    color: white;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ctb-demo-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.ctb-demo-placeholder p {
    margin: 0;
    font-size: 18px;
    opacity: 0.9;
}

/* Demo Block Image - Full width/height */
.ctb-demo-image {
    margin: 0;
    text-align: center;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    background: #000;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

.ctb-demo-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; /* Ensure image covers the area while maintaining aspect ratio */
}

/* Actions overlay - centered over image */
.ctb-demo-actions {
    padding: 25px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.ctb-demo-actions-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.ctb-demo-modern .ctb-demo-actions-overlay {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    animation: modernPulse 4s ease-in-out infinite;
}

.ctb-demo-modern .ctb-demo-button.ctb-demo-primary,
.ctb-demo-modern .ctb-demo-button.ctb-demo-secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.ctb-demo-modern .ctb-demo-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.ctb-demo-modern .ctb-demo-button.ctb-demo-primary:hover,
.ctb-demo-modern .ctb-demo-button.ctb-demo-secondary:hover {
    transform: translateY(-5px) scale(1.05) !important;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4) !important;
}

.ctb-demo-modern .ctb-demo-button:hover:before {
    left: 100%;
}

@keyframes modernFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(0.5deg); }
    50% { transform: translateY(-10px) rotate(0deg); }
    75% { transform: translateY(-5px) rotate(-0.5deg); }
}

@keyframes modernRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes modernPulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.02); opacity: 1; }
}

/* Gaming Style - Cyberpunk with glitch effects */
.ctb-demo-gaming {
    background: 
        linear-gradient(45deg, #0f0f23 25%, transparent 25%), 
        linear-gradient(-45deg, #0f0f23 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #1a1a2e 75%), 
        linear-gradient(-45deg, transparent 75%, #1a1a2e 75%),
        linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    background-size: 20px 20px, 20px 20px, 20px 20px, 20px 20px, 100% 100%;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px, 0 0;
    border: 2px solid #00ff88;
    color: #eee;
    position: relative;
    overflow: hidden;
    animation: gamingGlitch 8s infinite;
    box-shadow: 
        0 0 20px rgba(0, 255, 136, 0.3),
        inset 0 0 20px rgba(0, 255, 136, 0.1);
}

.ctb-demo-gaming:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 255, 136, 0.2) 0%, transparent 30%),
        radial-gradient(circle at 80% 80%, rgba(255, 0, 136, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 40% 60%, rgba(0, 136, 255, 0.1) 0%, transparent 30%);
    animation: gamingOrbit 15s linear infinite;
    z-index: 1;
}

.ctb-demo-gaming:after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.1), transparent);
    animation: gamingScan 3s linear infinite;
    z-index: 2;
}

.ctb-demo-gaming .ctb-demo-actions-overlay {
    background: 
        linear-gradient(135deg, rgba(22, 33, 62, 0.95) 0%, rgba(15, 15, 35, 0.9) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 10;
    border: 2px solid #00ff88;
    box-shadow: 
        0 0 40px rgba(0, 255, 136, 0.5),
        inset 0 0 20px rgba(0, 255, 136, 0.1);
    animation: gamingPulse 2s ease-in-out infinite;
}

.ctb-demo-gaming .ctb-demo-actions-overlay:before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #00ff88, #ff0080, #0080ff, #00ff88);
    background-size: 200% 200%;
    border-radius: inherit;
    z-index: -1;
    animation: gamingBorder 4s linear infinite;
}

/* Gaming Button Styles */
.ctb-demo-gaming .ctb-demo-button.ctb-demo-primary,
.ctb-demo-gaming .ctb-demo-button.ctb-demo-secondary {
    background: linear-gradient(45deg, #00ff88, #00cc70) !important;
    color: #0f0f23 !important;
    border: 2px solid #00ff88 !important;
    font-family: 'Courier New', monospace !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    font-weight: bold !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease !important;
    animation: gamingButtonGlow 2s ease-in-out infinite alternate;
}

.ctb-demo-gaming .ctb-demo-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.ctb-demo-gaming .ctb-demo-button.ctb-demo-primary:hover,
.ctb-demo-gaming .ctb-demo-button.ctb-demo-secondary:hover {
    background: linear-gradient(45deg, #ff0080, #cc0066) !important;
    color: white !important;
    border-color: #ff0080 !important;
    box-shadow: 
        0 0 30px rgba(255, 0, 128, 0.6),
        0 0 60px rgba(255, 0, 128, 0.4) !important;
    transform: translateY(-3px) scale(1.05) !important;
    animation: gamingGlitch 0.3s ease-in-out;
}

.ctb-demo-gaming .ctb-demo-button:hover:before {
    left: 100%;
}

.ctb-demo-gaming .ctb-demo-button.ctb-demo-primary:active,
.ctb-demo-gaming .ctb-demo-button.ctb-demo-secondary:active {
    animation: gamingShake 0.5s ease-in-out;
}

/* Gaming Animations */
@keyframes gamingGlitch {
    0%, 100% { transform: translateY(0) skew(0deg); }
    10% { transform: translateY(-2px) skew(2deg); }
    20% { transform: translateY(2px) skew(-2deg); }
    30% { transform: translateY(-1px) skew(1deg); }
    40% { transform: translateY(1px) skew(-1deg); }
    50% { transform: translateY(0) skew(0deg); }
}

@keyframes gamingOrbit {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes gamingScan {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes gamingPulse {
    0%, 100% { 
        box-shadow: 
            0 0 40px rgba(0, 255, 136, 0.5),
            inset 0 0 20px rgba(0, 255, 136, 0.1);
    }
    50% { 
        box-shadow: 
            0 0 60px rgba(0, 255, 136, 0.8),
            inset 0 0 30px rgba(0, 255, 136, 0.2);
    }
}

@keyframes gamingBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes gamingButtonGlow {
    0% { box-shadow: 0 0 10px rgba(0, 255, 136, 0.3); }
    100% { box-shadow: 0 0 20px rgba(0, 255, 136, 0.6); }
}

@keyframes gamingShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

/* Gaming Placeholder */
.ctb-demo-gaming .ctb-demo-placeholder {
    background: linear-gradient(135deg, #16213e 0%, #0f0f23 100%);
    border: 2px solid #00ff88;
    border-left: none;
    border-right: none;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Minimal Style - Clean with subtle interactions */
.ctb-demo-minimal {
    background: 
        linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    box-shadow: 
        0 2px 20px rgba(0, 0, 0, 0.05),
        0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.ctb-demo-minimal:hover {
    box-shadow: 
        0 8px 40px rgba(0, 0, 0, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.ctb-demo-minimal:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #6c757d, #28a745, #ffc107, #dc3545);
    background-size: 200% 100%;
    animation: minimalProgress 8s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ctb-demo-minimal:hover:before {
    opacity: 1;
}

.ctb-demo-minimal .ctb-demo-actions-overlay {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #dee2e6;
    box-shadow: 
        0 4px 25px rgba(0, 0, 0, 0.08),
        0 2px 10px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    animation: minimalFadeIn 0.5s ease-out;
}

.ctb-demo-minimal .ctb-demo-actions-overlay:hover {
    box-shadow: 
        0 6px 35px rgba(0, 0, 0, 0.12),
        0 3px 15px rgba(0, 0, 0, 0.08);
    /* Прибираємо transform щоб overlay не рухався */
}

.ctb-demo-minimal .ctb-demo-button.ctb-demo-primary,
.ctb-demo-minimal .ctb-demo-button.ctb-demo-secondary {
    background: #ffffff !important;
    color: #495057 !important;
    border: 2px solid #dee2e6 !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden;
}

.ctb-demo-minimal .ctb-demo-button.ctb-demo-primary:hover,
.ctb-demo-minimal .ctb-demo-button.ctb-demo-secondary:hover {
    background: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3) !important;
    /* Прибираємо transform щоб кнопки не рухались */
}

.ctb-demo-minimal .ctb-demo-button.ctb-demo-primary:active,
.ctb-demo-minimal .ctb-demo-button.ctb-demo-secondary:active {
    transform: scale(0.98) !important;
    transition: transform 0.1s ease !important;
}

/* Minimal Animations */
@keyframes minimalProgress {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes minimalFadeIn {
    0% { 
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    100% { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}



.ctb-demo-minimal .ctb-demo-placeholder {
    background: #f8f9fa;
    color: #6c757d;
    padding: 40px 20px;
}

/* Tech Style - Futuristic with circuit patterns */
.ctb-demo-tech {
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(91, 134, 229, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1e1e1e 100%);
    color: #e0e0e0;
    border: 2px solid #00d4ff;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 30px rgba(0, 212, 255, 0.2),
        inset 0 0 30px rgba(0, 212, 255, 0.05);
}

.ctb-demo-tech:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d4ff, #5b86e5, #36d1dc, #00d4ff);
    background-size: 300% 100%;
    animation: techFlow 4s linear infinite;
    z-index: 2;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.ctb-demo-tech:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, transparent 98%, rgba(0, 212, 255, 0.1) 100%),
        linear-gradient(0deg, transparent 98%, rgba(0, 212, 255, 0.1) 100%);
    background-size: 20px 20px, 20px 20px;
    animation: techGrid 10s linear infinite;
    z-index: 1;
    opacity: 0.3;
}

.ctb-demo-tech .ctb-demo-actions-overlay {
    background: 
        linear-gradient(135deg, rgba(30, 30, 30, 0.98) 0%, rgba(45, 45, 45, 0.95) 100%);
    border: 2px solid #00d4ff;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 
        0 0 40px rgba(0, 212, 255, 0.3),
        inset 0 0 20px rgba(0, 212, 255, 0.1);
    animation: techPulseOverlay 3s ease-in-out infinite;
}
.ctb-demo-tech .ctb-demo-button.ctb-demo-primary,
.ctb-demo-tech .ctb-demo-button.ctb-demo-secondary {
    background: transparent !important;
    color: #00d4ff !important;
    border: 2px solid #00d4ff !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    font-weight: 600 !important;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease !important;
    animation: techButtonPulse 2s ease-in-out infinite alternate;
}

.ctb-demo-tech .ctb-demo-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 212, 255, 0.2), 
        rgba(0, 212, 255, 0.4), 
        rgba(0, 212, 255, 0.2), 
        transparent);
    transition: left 0.6s ease;
}

.ctb-demo-tech .ctb-demo-button.ctb-demo-primary:hover,
.ctb-demo-tech .ctb-demo-button.ctb-demo-secondary:hover {
    background: linear-gradient(135deg, #00d4ff, #36d1dc) !important;
    color: #1e1e1e !important;
    box-shadow: 
        0 0 40px rgba(0, 212, 255, 0.6),
        0 0 80px rgba(0, 212, 255, 0.4) !important;
    transform: translateY(-3px) scale(1.05) !important;
    border-color: #36d1dc !important;
}

.ctb-demo-tech .ctb-demo-button:hover:before {
    left: 100%;
}

.ctb-demo-tech .ctb-demo-button.ctb-demo-primary:active,
.ctb-demo-tech .ctb-demo-button.ctb-demo-secondary:active {
    animation: techGlitch 0.3s ease-in-out;
}

.ctb-demo-tech .ctb-demo-placeholder {
    background: linear-gradient(135deg, #2c2c2c 0%, #1e1e1e 100%);
    border: 1px solid #333;
    border-left: none;
    border-right: none;
}

/* Tech Animations */
@keyframes techFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

@keyframes techGrid {
    0% { background-position: 0 0; }
    100% { background-position: 20px 20px; }
}

@keyframes techPulseOverlay {
    0%, 100% { 
        box-shadow: 
            0 0 40px rgba(0, 212, 255, 0.3),
            inset 0 0 20px rgba(0, 212, 255, 0.1);
    }
    50% { 
        box-shadow: 
            0 0 60px rgba(0, 212, 255, 0.5),
            inset 0 0 30px rgba(0, 212, 255, 0.2);
    }
}

@keyframes techBorderFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes techButtonPulse {
    0% { 
        box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
        border-color: #00d4ff;
    }
    100% { 
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
        border-color: #36d1dc;
    }
}

@keyframes techGlitch {
    0%, 100% { transform: translateX(0) skew(0deg); }
    20% { transform: translateX(-2px) skew(2deg); }
    40% { transform: translateX(2px) skew(-2deg); }
    60% { transform: translateX(-1px) skew(1deg); }
    80% { transform: translateX(1px) skew(-1deg); }
}

/* Tech Placeholder */
.ctb-demo-tech .ctb-demo-placeholder {
    background: linear-gradient(135deg, #2c2c2c 0%, #1e1e1e 100%);
    border: 1px solid #00d4ff;
    border-left: none;
    border-right: none;
    color: #00d4ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Button Click Effects */
.ctb-demo-button:active {
    transform: scale(0.98);
}

.ctb-demo-gaming .ctb-demo-button:active {
    transform: scale(0.95);
}

/* Iframe Container */
.ctb-demo-iframe-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ctb-demo-iframe-wrapper {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 80%;
    background: var(--ctb-color-background-body, white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.ctb-demo-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ctb-demo-block {
        padding: 20px;
        margin: 20px 0;
    }
    
    .ctb-demo-title {
        font-size: 20px;
    }
    
    .ctb-demo-description {
        font-size: 14px;
    }
    
    .ctb-demo-button {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .ctb-demo-iframe-wrapper {
        width: 95%;
        height: 85%;
    }
    
    .ctb-demo-image-container {
        min-height: 250px;
        max-height: 300px;
        /* Height is controlled by inline style, but we set a smaller min-height on mobile */
    }
    
    .ctb-demo-actions-overlay {
        padding: 15px;
        border-radius: 8px;
        transform: translate(-50%, -50%) !important;
    }
    
    .ctb-demo-button {
        padding: 12px 20px;
        font-size: 14px;
        min-width: 120px;
    }
    
    .ctb-demo-placeholder {
        padding: 30px 15px;
    }
    
    .ctb-demo-icon {
        font-size: 36px;
    }
    
    /* Responsive button layout for overlay */
    .ctb-demo-actions-overlay {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        width: 90%;
        max-width: 300px;
    }
    
    .ctb-demo-actions-overlay .ctb-demo-button {
        width: 100%;
        max-width: none;
        min-width: auto;
        margin: 0;
    }
    
    /* Mobile styles for close button */
    .ctb-demo-close-inline {
        width: 40px !important;
        height: 40px !important;
        font-size: 20px !important;
        top: 15px !important;
        right: 15px !important;
    }
    .ctb-demo-block {
        padding: 0.5rem !important;
        margin: 0.5rem 0 !important;
        max-height: 300px;
    }
    .ctb-demo-tech .ctb-demo-button.ctb-demo-primary, .ctb-demo-tech .ctb-demo-button.ctb-demo-secondary {
        letter-spacing: 0 !important;
        margin: 0;
    }
} 

/* Fallback for older browsers */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
    .ctb-demo-button:hover {
        background: #005a87;
        box-shadow: 0 8px 25px rgba(0, 115, 170, 0.3);
    }
    
    .ctb-demo-close:hover {
        background: #c82333;
    }
    
    .ctb-demo-primary {
        background: linear-gradient(135deg, #0073aa, #005a87);
    }
    
    .ctb-demo-primary:hover {
        background: linear-gradient(135deg, #3a8bc7, #0073aa);
        box-shadow: 0 8px 25px rgba(0, 115, 170, 0.3);
    }
    
    .ctb-demo-secondary {
        background: linear-gradient(135deg, #28a745, #1e7e34);
    }
    
    .ctb-demo-secondary:hover {
        background: linear-gradient(135deg, #34ce57, #28a745);
        box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    }
    
    .ctb-demo-modern {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
    }
    
    .ctb-demo-tech {
        background: linear-gradient(135deg, rgba(23, 162, 184, 0.2), #2d2d2d);
    }
} 