.shakebug-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    position: fixed;
    z-index: 999999;
}

.shakebug-wrapper * {
    box-sizing: border-box;
}

.shakebug-wrapper .hidden {
    display: none !important;
}

/* Floating Action Button & Menu */
.shakebug-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 0;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.shakebug-menu-backdrop.hidden {
    opacity: 0;
    pointer-events: none;
    display: block !important; /* Override standard .hidden if necessary to keep transition, but pointer-events prevents interaction */
}

.shakebug-fab-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    z-index: 10;
}

.shakebug-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    animation: shakebugFadeInUp 0.2s ease;
}

@keyframes shakebugFadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.shakebug-menu-item-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    font-size: 13px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}

.shakebug-menu-item-pill:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.shakebug-menu-item-pill svg {
    color: var(--shakebug-primary-color, #1dd3e3);
}

.shakebug-powered-by {
    font-size: 11px;
    color: #a4b0be;
    text-align: center;
    margin-top: 4px;
}

.shakebug-fab {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #2f3542;
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.shakebug-fab:hover {
    transform: scale(1.05);
    background: #1e272e;
}

/* Modals Overlay */
.shakebug-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.1);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* Base Modal Styles */
.shakebug-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: shakebugZoomIn 0.2s ease;
}

@keyframes shakebugZoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.shakebug-full-modal {
    width: calc(100vw - 48px);
    max-width: 1280px;
    height: calc(100vh - 48px);
    max-height: 800px;
}

.shakebug-split-modal {
    width: calc(100vw - 48px);
    max-width: 1280px;
    height: calc(100vh - 48px);
    max-height: 800px;
}

.shakebug-small-modal {
    width: 400px;
    padding: 32px;
    text-align: center;
}

#shakebug-discard-modal {
    position: absolute;
    margin: auto;
    top: 0; bottom: 0; left: 0; right: 0;
    height: fit-content;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.5), 0 20px 40px rgba(0,0,0,0.15);
    z-index: 1000;
}

.shakebug-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #f1f2f6;
}

.shakebug-modal-header.border-none {
    border-bottom: none;
}

.shakebug-logo {
    color: #00d2d3;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
}

.shakebug-logo strong {
    color: #2f3542;
}

.shakebug-modal-title {
    font-weight: 600;
    font-size: 15px;
    color: #2f3542;
}

.shakebug-close-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}
.shakebug-close-btn:hover {
    background: #f1f2f6;
    color: #333;
}

/* Annotation Modal specific */
.shakebug-annotation-body {
    flex: 1;
    background: #f5f6fa;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.shakebug-screenshot-preview {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.shakebug-dummy-screenshot {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-weight: 500;
}

.shakebug-annotation-footer {
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}

.shakebug-drawing-tools {
    /* Layout handled inline */
}

.shakebug-colors {
    display: flex;
    gap: 8px;
}

.shakebug-color {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all 0.2s;
}
.shakebug-color.active {
    border-color: #2f3542;
    transform: scale(1.1);
}

.shakebug-tool-sizes {
    display: flex;
    align-items: center;
    gap: 8px;
}
.shakebug-size {
    width: 24px;
    height: 24px;
    background: none;
    border: 1px solid #dcdde1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.shakebug-size.active {
    border-color: var(--shakebug-primary-color, #1dd3e3);
}
.shakebug-size span {
    background: #747d8c;
    border-radius: 50%;
    display: block;
}

.shakebug-tool-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.shakebug-tool-actions button {
    background: none;
    border: none;
    color: #747d8c;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.shakebug-tool-actions button:hover {
    background: #f1f2f6;
}
.shakebug-tool-actions button.active {
    background: var(--shakebug-primary-color, #1dd3e3);
    color: #fff;
}
.shakebug-tool-divider {
    width: 1px;
    height: 20px;
    background: #dcdde1;
    margin: 0 4px;
}

/* Text Overlays */
.shakebug-text-overlay {
    position: absolute;
    border: 2px solid #ff4757;
    border-radius: 8px;
    background: #fff;
    padding: 8px 36px 8px 12px;
    min-width: 60px;
    cursor: text;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-family: 'Inter', -apple-system, sans-serif;
    color: #333;
    z-index: 10;
    outline: none;
}
.shakebug-text-overlay-check {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #ff4757;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    user-select: none;
}

.shakebug-footer-actions {
    display: flex;
    gap: 12px;
}

/* Recording Toolbar */
.shakebug-recording-toolbar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    padding: 8px 12px;
    z-index: 10000;
}
.shakebug-btn-danger {
    background: #ff4757;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.shakebug-btn-danger:hover {
    background: #ff3344;
}

/* Video Preview */
.shakebug-video-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}
.shakebug-play-btn {
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255,255,255,0.5);
    transition: background 0.2s;
}
.shakebug-play-btn:hover {
    background: rgba(255,255,255,0.5);
}

/* Split Modal (Add Details) */
.shakebug-split-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}
.shakebug-split-left {
    flex: 1;
    background: #f1f2f6;
    padding: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
}
.shakebug-screenshot-thumbnail {
    width: 100%;
    height: 100%;
    background: transparent;
    overflow: hidden;
}
.shakebug-dummy-screenshot-small {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
}

.shakebug-split-right {
    width: 35%;
    min-width: 400px;
    max-width: 600px;
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
}

.shakebug-form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.shakebug-form-header h3 {
    margin: 0 0 4px 0;
    font-size: 15px;
    color: #2f3542;
}
.shakebug-form-header p {
    margin: 0 0 24px 0;
    font-size: 13px;
    color: #747d8c;
}

.shakebug-form-group {
    margin-bottom: 20px;
}
.shakebug-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #2f3542;
    margin-bottom: 8px;
}
.shakebug-form-group input,
.shakebug-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dcdde1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.shakebug-form-group input:focus,
.shakebug-form-group textarea:focus {
    border-color: var(--shakebug-primary-color, #1dd3e3);
}
.shakebug-form-group textarea {
    height: 100px;
    resize: none;
}

.shakebug-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f1f2f6;
}

.shakebug-copyright {
    position: absolute;
    bottom: 16px;
    right: 24px;
    font-size: 11px;
    color: #a4b0be;
}

/* Small Modals */
.shakebug-discard-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #ffeff1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.shakebug-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e8f8f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.shakebug-small-modal h3 {
    margin: 0 0 8px 0;
    color: #2f3542;
    font-size: 18px;
}
.shakebug-small-modal p {
    margin: 0 0 24px 0;
    color: #747d8c;
    font-size: 14px;
    line-height: 1.5;
}

.shakebug-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.shakebug-success-content {
    padding: 24px 0;
}
.shakebug-copyright-center {
    font-size: 11px;
    color: #a4b0be;
    text-align: center;
    margin-top: -8px;
    padding-bottom: 16px;
}

/* Buttons */
.shakebug-btn {
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: inherit;
    border: none;
}
.shakebug-btn-outline {
    background: #fff;
    border: 1px solid #dcdde1;
    color: #2f3542;
}
.shakebug-btn-outline:hover {
    border-color: #a4b0be;
    background: #f5f6fa;
}
.shakebug-btn-primary {
    background: var(--shakebug-primary-color, #1dd3e3);
    color: #fff;
}
.shakebug-btn-primary:hover {
    filter: brightness(0.9);
}
.shakebug-btn-danger {
    background: #ff4757;
    color: #fff;
}
.shakebug-btn-danger:hover {
    background: #e84118;
}
.shakebug-btn-block {
    width: 100%;
}

/* Review Modal Styles */
.shakebug-review-modal {
    width: 320px;
    padding: 32px 24px;
    text-align: center;
    border-radius: 20px;
}

.shakebug-review-icon {
    width: 64px;
    height: 64px;
    background: #5468ff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
    box-shadow: 0 10px 25px rgba(84, 104, 255, 0.4);
    color: white;
}

.shakebug-review-text {
    font-size: 13px;
    color: #4b4b4b;
    line-height: 1.5;
    margin-bottom: 24px;
    font-weight: 500;
}

.shakebug-review-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.shakebug-review-star {
    cursor: pointer;
    color: #dfe4ea;
    transition: color 0.2s;
}

.shakebug-review-star:hover,
.shakebug-review-star.active,
.shakebug-review-star.hovered {
    color: #ff9f43;
}

.shakebug-review-star svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
}

.shakebug-review-star.active svg,
.shakebug-review-star.hovered svg {
    fill: currentColor;
}

.shakebug-review-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shakebug-btn-review-submit {
    background: #7a8cff;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}
.shakebug-btn-review-submit:hover {
    background: #6275ff;
}

.shakebug-btn-review-later {
    background: white;
    color: #4b4b4b;
    border: 1px solid #dfe4ea;
    padding: 12px;
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}
.shakebug-btn-review-later:hover {
    background: #f1f2f6;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    .shakebug-overlay {
        padding: 12px;
    }
    
    .shakebug-full-modal, .shakebug-split-modal {
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 12px;
    }
    
    .shakebug-split-container {
        flex-direction: column;
        overflow-y: auto;
    }
    
    .shakebug-split-left {
        flex: none;
        height: 250px;
        min-height: 250px;
    }
    
    .shakebug-split-right {
        width: 100%;
        min-width: 100%;
        padding: 20px;
        flex: none;
    }
    
    .shakebug-small-modal, .shakebug-review-modal {
        width: 100%;
        padding: 24px 20px;
    }
    
    .shakebug-annotation-footer {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    
    .shakebug-tools-row {
        gap: 12px !important;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .shakebug-colors {
        padding: 0 !important;
    }
    
    .shakebug-footer-actions {
        width: 100%;
    }
    
    .shakebug-footer-actions button {
        flex: 1;
    }
    
    .shakebug-recording-toolbar {
        bottom: 16px;
        width: calc(100vw - 32px);
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 16px;
        border-radius: 20px;
    }
    
    .shakebug-recording-toolbar .shakebug-tool-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .shakebug-recording-toolbar .shakebug-colors {
        padding: 0 8px !important;
    }
    
    .shakebug-recording-toolbar .shakebug-btn-danger {
        margin-left: 0 !important;
        width: 100%;
        justify-content: center;
    }
    
    .shakebug-recording-toolbar .shakebug-tool-divider {
        display: none;
    }
    
    .shakebug-form-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .shakebug-form-actions button {
        width: 100%;
    }
    
    .shakebug-copyright {
        position: static;
        text-align: center;
        margin-top: 24px;
        width: 100%;
        display: block;
    }
}
