/*
bounding-box-drawer.css
*/
 /*font-styling*/

.montserrat-header {
  font-optical-sizing: auto;
  font-style: normal;
  color: blue;
  font-size:48px;

}

.dm-serif-text-regular {
  font-family: "DM Serif Text", serif;
  font-weight: 400;
  font-style: normal;
  font-size: 60px;
}

.gradient-text {
font-weight: 700;
color: #2d3748;
margin-bottom: 12px;
background: linear-gradient(135deg, #667eea, #764ba2);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}

/*h3 {
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  color: blue;
  font-size:24px;
}*/

/*progress bar styling*/
.progress-container {
    width: 200px;
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 10px;
    margin: 0 0 35px;
    overflow: hidden;
    /*border:  1px solid grey;*/
    display: none;
    position:absolute;
    z-index:-1;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(135deg, 
                #667eea 0%, 
                #764ba2 25%,
                #667eea 50%,
                #764ba2 75%,
                #667eea 100%
            );
    transition: width 0.3s ease;
}

/* Container to hold both elements side by side */
.canvas-and-box-container {
    display: block;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px; /* Space between the canvas and box list */
    width: fit-content;
    border-radius: 8px;
    margin:20px auto 20px auto;
    padding-bottom: 1px;
    position:relative;
}

.canvas-container {
    position: relative;
    height: fit-content;
    line-height: 0;
}

#imageCanvas {
    cursor: crosshair ;
}
.box-list {
    width: 100%;
}
.box-item {
    margin: 5px 0;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 20%;
    width: 60%;
    margin: 10px auto 10px auto;
}
.delete-btn {
    background-color: #ff4444;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}
.delete-btn:hover {
    background-color: #cc0000;
}
.instructions {
    margin: 20px 0;
    padding: 15px;
    border-radius: 4px;
}
.tooltip {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    display: none;
    transform: translate(-50%, -100%);
    margin-top: -2px;
}

.control-panel {
    padding: 20px;
}

.control-row {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.control-group-sec1 {    
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 200px;
}

.control-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    text-align: left;
}

.control-select {
    color: #333;
    border: 1px solid #e5e5e5;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23666' d='m0 1 2 2 2-2z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    padding-right: 30px;
}

.control-select:hover {
    border-color: #ccc;
}

.control-select:focus {
    outline: none;
    border-color: #007acc;
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.1);
}

@media (max-width: 768px) {
    .control-row {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

}

#send-btn {
    padding: 8px 16px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    width: 100%;
    box-sizing: border-box;
    cursor: not-allowed;
}

#send-btn:hover {
    background-color: #3367d6;
}

button#send-btn.disabled {
    background: #e9e9ed !important;
}

/* Blue-Green Diagonal Shimmer */
.blue-green-shimmer-button {
            background: linear-gradient(135deg, 
                #667eea 0%, 
                #764ba2 25%,
                #667eea 50%,
                #764ba2 75%,
                #667eea 100%
            );
            background-size: 300% 300%;
            animation: diagonal-shimmer 2.5s infinite;
            color: white;
            border: none;
            padding: 15px 30px;
            border-radius: 12px;
            font-size: 1rem;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.3s;
 }

@keyframes diagonal-shimmer {
            0% { background-position: 0% 0%; }
            50% { background-position: 100% 100%; }
            100% { background-position: 0% 0%; }
}

.form-group {
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 14px;
    color: #555;
    margin-bottom: 2px;
    margin-right: 2%;

}

.form-group-2 {
    gap: 4px;
    margin:10px;
}

.form-group-2 label {
    font-size: 14px;
    color: #555;
    margin-bottom: 2px;
    margin-right: 2%;
    
}

.checkbox-container {
    display: flex;
    align-items: center;
    font-size: 14px;
    margin: 10px;
}

#isContentAwareFill {
    margin-right: 6px;
}

.container-select-file-btn {
    border-radius: 10px;
    position: absolute;
    top: 25px;
    left: 50px;
}

.select-file-btn {
    width: 200px;
    position: relative;
    display: inline-block;
}
    
.select-file-btn input[type="file"] {
    width: 100%;
    position: absolute;
    left: 0;
    top: 0px;
    opacity: 0;
    height: 100%;
    cursor: pointer;
    z-index: 1;
}

/* Styling for canvas top and bottom dividers */
.top-hr {
    border: 0.5px solid lightgray;
}

.bottom-hr {
    border: 0.5px solid lightgray;
}

.change-image-btn {
    position: absolute;
    left:20px;
    border:1px solid #ccc;
    border-radius: 3px;
    padding:4px;
    font-size: 12px;
}

.return-section-1-btn {
    position: absolute;
    left:20px;
    border:1px solid #ccc;
    border-radius: 3px;
    padding:4px;
    font-size: 12px;
    align-items: center;
}

.custom-file-upload {
    display: block;
    background-color: #e9e9ed;
    border: 1px dashed #ccc;
    border-radius: 4px;
    padding: 40px 16px;
    text-align: center;
    font-size: 14px;
    color: #333 !important;
    cursor: pointer;
    width: 100%;
    height:100px;
    box-sizing: border-box;
}

.custom-file-upload.file-selected {
    background: #e9e9ed; /* Grey when file is selected */
    color:lightgray !important;
}

.container-download-btn {
    text-align: center;
}

.download-btn {
    width: 200px;
    position: relative;
    overflow: hidden;
    display: inline-block;
}

/*Styling for box drawing animation*/
.bbox-animation-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10%;
}

.bbox-animation-demo-button {
    position: relative;
}

.bbox-animation-tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    width: 280px;
}

.bbox-animation-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
}

.bbox-animation-demo-button:hover .bbox-animation-tooltip {
    opacity: 1;
    visibility: visible;
}

.bbox-animation-tooltip-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    text-align: center;
}

.bbox-animation-canvas {
    width: 250px;
    height: 150px;
    border: 1px solid #eee;
    border-radius: 4px;
    background: #fafafa;
    margin: 0 auto;
    display: block;
}

.bbox-animation-tooltip-description {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 8px;
}

/* 
overlay-image-edit-style.css
*/
body {
/*    font-family: Arial, sans-serif;*/
    font-family: Noto Sans, sans-serif;
    /*max-width: 1200px;*/
    margin: 0 auto;
    /*padding: 20px;*/
    background-color: #f5f5f5;
}
h1 {
    text-align: center;
    color: #333;
}

.logo {
    height: 100px;
}

.container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
}

.container-nav-btns {
    /*border: 1px solid red;*/
    text-align: left;
}

.upload-section {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.json-input {
    width: 100%;
    min-height: 100px;
    margin-top: 10px;
    font-family: monospace;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.translation-textarea {
    width: 92.5%;
    min-height: 60px;
    margin-top: 5px;
    font-family: 'Noto Sans JP', sans-serif;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}
.image-container {
    position: relative;
    /*margin-top: 20px;*/
    /*background-color: white;*/
    padding: 20px;
    /*border-radius: 10px;*/
    /*box-shadow: 0 2px 4px rgba(0,0,0,0.1);*/
    /*border: 2px solid grey;*/
    overflow: hidden;
    width: fit-content;
/*    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1), 
              0 10px 20px rgba(0, 0, 0, 0.05);*/
    /*border-radius: 8px;*/
}
.image-wrapper {
    position: relative;
    display: inline-block;
    margin-right: 20px;
}
#imagePreview {
    max-width: 100%;
    height: auto;
    display: block;
    color: lightgray;
}
.translation-box {
    position: absolute;
    border: 2px solid rgba(255, 0, 0, 0.5);
    white-space: pre; /* Only break at explicit newlines */
    overflow: visible; /* Allow text to overflow */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: bold;
    cursor: move; /* Show move cursor */
    user-select: none; /* Prevent text selection during drag */
    transform-origin: center center; /* Set rotation origin to center */
}
.box-label {
    position: absolute;
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 4px;
    top: -20px;
    left: 0;
}
.original-text-container {
    display: inline-block;
    vertical-align: top;
    max-width: 300px;
}
.original-text-item {
    background-color: #f9f9f9;
    padding: 10px;
    /*margin-bottom: 10px;*/
    /*border-radius: 4px;*/
    border-left: 4px solid #333;
}
.alignment-controls {
    margin-top: 10px;
    display: flex;
    gap: 5px;
}
.font-size-control, .rotation-control, .font-weight-control, .reset-btn {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.font-size-slider, .rotation-slider, .font-weight-slider{
    flex-grow: 1;
    accent-color: #6d67c4;
}
.font-size-value, .rotation-value, .font-weight-value {
    min-width: 30px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.font-style-control, .font-color-control {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.font-style-select, .color-picker {
    flex-grow: 1;
}

.font-style-select {
    max-width: 83.5%;
}

/*
.original-control-group {
    border-top: 1px solid #eee;
    padding-top: 10px;
}
*/
.control-group {
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 10px;
}
.control-group-label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
}
.align-btn {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.align-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}
.align-btn:hover:not(.active) {
    background-color: #e0e0e0;
}
.button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}
.button:hover {
    background-color: #45a049;
}
.button.download {
    /*background-color: #2196F3;*/
    /*background-color: #4285f4;*/
    /*margin-left: 10px;*/
}
.button.download:hover {
    background-color: #0b7dda;
}
.hidden {
    display: none;
}
.error {
    color: red;
    margin-top: 10px;
}

.section {
    display: none;
    margin: -20px 0;
}
.section.active {
    display: block;
}

.collapsible-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.collapsible-header {
    background-color: #f5f5f5;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.collapsible-title {
    font-weight: bold;
    margin: 0;
}

.collapsible-arrow {
    transition: transform 0.3s ease;
    font-size: 20px;
}

.collapsible-content {
/*    padding: 0 15px;
    max-height: 200px;*/
    overflow: hidden;
    transition: all 0.3s ease;
}

.collapsed .collapsible-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.collapsed .collapsible-arrow {
    transform: rotate(-90deg);
}

#downloadButton {
    /*display: block;*/
    /*min-width: 200px;*/
    /*margin: 20px auto 0 20px; /* Sets top margin and auto side margins for centering */
    width: 200px;
    /*display: inline-block;*/
}


/*section1/2 nav button styling*/
.nav-buttons{
    margin: 20px;
}
.nav-buttons > .active-section {
    font-family: Noto Sans, sans-serif;
    color: gray;
    /*background-color:#232b2b;*/
    background: none;
    border-radius: 5px;
    cursor:  pointer;
    border:  none;
}

.nav-buttons > button {
    font-family: Noto Sans, sans-serif;
    color: lightgray;
    /*background-color: lightgray;*/
    background: none;
    border-radius: 5px;
    border:  none;
    cursor:  pointer;
    border-color: darkgray;
}

.info-text {
            background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
            border: 1px solid #bbdefb;
            border-radius: 12px;
            padding: 16px 20px;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            font-size: 14px;
            line-height: 1.5;
            color: #2c3e50;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
            position: relative;
            overflow: hidden;
            padding-left: 48px; /* Space for the icon */
            transition: all 0.2s ease;
            text-align: left;
            display: block;
            width: auto;
            max-width: 350px;
            margin: 10px auto 20px auto;
}

.info-text::before {
    content: "💡";
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 18px;
    opacity: 0.7;
}

.info-text strong {
    color: #1976d2;
    font-weight: 600;
}

/* Subtle animation on hover */
.info-text:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    cursor: help;
}

/* Optional: Add a subtle border accent */
.info-text::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #2196f3, #9c27b0);
    border-radius: 2px 0 0 2px;
}

/* Upgrade button */
.upgrade-button {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.upgrade-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Adjust user controls spacing */
.user-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Premium badge */
.premium-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Add this CSS to your existing <style> section in index.html */

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Modal Container */
.modal-container {
    background: #ffffff;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    /*overflow-y: auto;*/
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px 16px 32px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #a0aec0;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #f7f7f7;
    color: #4a5568;
}

/* Modal Content */
.modal-content {
    padding: 16px 32px 32px 32px;
}

.modal-subtitle {
    font-size: 1rem;
    color: #4a5568;
    text-align: center;
    margin-bottom: 32px;
    margin-top: 0;
}

/* Plans Grid */
.modal-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    align-items: stretch;
}

/* Plan Cards */
.modal-plan-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px 20px;
    text-align: center;
    border: 1px solid #e5e5e5;
    position: relative;
    display: flex;
    flex-direction: column;
    /*height: 100%;*/
}

.modal-plan-card.popular {
    border: 2px solid #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.modal-popular-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.modal-plan-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
    margin-top: 8px;
}

.modal-plan-price {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 4px;
}

.modal-plan-period {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 20px;
}

.modal-plan-features {
    list-style: none;
    margin-bottom: 24px;
    flex-grow: 1;
    padding: 0;
}

.modal-plan-features li {
    padding: 6px 0;
    color: #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
}

.modal-checkmark {
    color: #48bb78;
    font-weight: bold;
}

.modal-plan-button {
    /*width: 100%;*/
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.modal-plan-button.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.modal-plan-button.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.modal-plan-button.disabled {
    background: #f7f7f7;
    color: #a0aec0;
    cursor: not-allowed;
    border: 1px solid #e5e5e5;
}

/* Modal Footer */
.modal-footer {
    padding: 0 32px 0px 32px;
    text-align: right;
    border-top: 1px solid #f7f7f7;
    margin-top: 24px;
    padding-top: 16px;
}

.manage-account-link {
    color: #718096;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.manage-account-link:hover {
    color: #4a5568;
    text-decoration: underline;
}
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .modal-container {
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 20px 24px 16px 24px;
    }
    
    .modal-content {
        padding: 16px 24px 24px 24px;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .modal-plans-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .modal-plan-card {
        padding: 20px 16px;
    }

    .modal-footer {
        padding: 0 24px 20px 24px;
        padding-top: 16px;
    }
}

.manage-acct-button {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.manage-acct-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.secondary-upgrade-button {
  /* Base button styling */
  /*padding: 12px 24px;*/
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.6s ease;
  position: relative;
  background: transparent;
  overflow: hidden;

  /* Text shimmer effect for non-hover state */
  background: linear-gradient(135deg, #667eea, #764ba2);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 2s ease-in-out infinite;
}

/* Shimmer animation keyframes */
@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Hover state */
.secondary-upgrade-button:hover {
  /* Raise the button */
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  
  /* Change background to gradient and text to white */
  background: linear-gradient(135deg, #667eea, #764ba2);
  background-size: 200% 200%;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: white;
  color: white;
  
  /* Continue the shimmer animation on the background */
  animation: shimmer 2s ease-in-out infinite;
}

/* Optional: Active state for when button is clicked */
.secondary-upgrade-button:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.upgrade-modal-manage-account {
    padding: 6px 14px;
    background-color: #ffffff;
    color: #7a7a7a;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
}

.upgrade-modal-manage-account:hover {
    background-color: #f9f9f9;
    border-color: #d0d0d0;
    color: #333;
}

/* Fixed floating support button */
.support-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1001;
    
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    
    display: flex;
    align-items: center;
    gap: 8px;
    
    animation: supportPulse 4s ease-in-out infinite;
}

.support-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.support-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 15px rgba(102, 126, 234, 0.3);
}

@keyframes supportPulse {
    0%, 100% { 
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    }
    50% { 
        box-shadow: 0 4px 25px rgba(102, 126, 234, 0.5);
    }
}

.support-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Support Modal */
.support-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1002;
    backdrop-filter: blur(4px);
}

.support-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.support-modal-container {
    background: #ffffff;
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: supportModalSlideIn 0.3s ease-out;
    overflow: hidden;
}

@keyframes supportModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.support-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px 28px;
    position: relative;
}

.support-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.support-modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.support-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.support-modal-content {
    padding: 32px 28px;
    text-align: center;
}

.support-modal-description {
    font-size: 1.1rem;
    color: #4a5568;
    margin-bottom: 24px;
    line-height: 1.6;
}

.discord-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #5865F2;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.discord-link:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
    color: white;
    text-decoration: none;
}

.discord-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.support-note {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #718096;
    background: #f7fafc;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .support-button {
        bottom: 20px;
        right: 20px;
        padding: 14px 18px;
        font-size: 13px;
    }
    
    .support-icon {
        width: 16px;
        height: 16px;
    }

    .support-modal-container {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    .support-modal-header {
        padding: 20px 24px;
    }

    .support-modal-title {
        font-size: 1.3rem;
    }

    .support-modal-content {
        padding: 24px 20px;
    }
}

/* Floating video player */
.floating-video {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 320px;
    height: 240px;
    background: #000;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 1000;
    overflow: hidden;
    border: 2px solid #333;
    min-width: 200px;
    min-height: 150px;
}

.video-header {
    background: #333;
    color: white;
    padding: 8px 12px;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    user-select: none;
}

.video-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
    font-size: 12px;
}

.control-btn:hover {
    background: rgba(255,255,255,0.2);
}

.video-container {
    width: 100%;
    height: calc(100% - 40px);
    position: relative;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Resize handle */
.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(-45deg, transparent 0%, transparent 30%, #666 30%, #666 40%, transparent 40%, transparent 60%, #666 60%, #666 70%, transparent 70%);
    cursor: nw-resize;
}

/* Hidden state */
.floating-video.hidden {
    display: none;
}

/* Launch button */
.launch-video {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    margin: 20px 0;
}

.launch-video:hover {
    background: #0056b3;
}

.background-color-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.background-color-picker {
    width: 40px;
    height: 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.transparent-bg-btn {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 12px;
}

.transparent-bg-btn:hover {
    background: #f5f5f5;
}

.width-control, .height-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
}

.width-slider, .height-slider {
    flex: 1;
    min-width: 100px;
}

.width-value, .height-value {
    min-width: 50px;
    font-size: 12px;
    color: #666;
}

/*Font outline control*/
.outline-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.outline-thickness-slider {
    flex: 1;
    min-width: 100px;
    accent-color: #6d67c4;
}

.outline-thickness-value {
    min-width: 40px;
    font-size: 12px;
    color: #666;
    font-variant-numeric: tabular-nums;
}

.outline-color-picker {
    width: 40px;
    height: 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.no-outline-btn {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 12px;
}

.no-outline-btn:hover {
    background: #f5f5f5;
}
/******/

/*Italics control*/
.italics-checkbox {
    margin-left: auto;
    transform: scale(1.2);
    accent-color: #6d67c4;
}

.persistent-help-message {
    position: relative;
    display: inline-block;
    padding: 2px 4px;
    color: #4CAF50; /* Green text color */
    background: rgba(76, 175, 80, 0.1); /* Light green background */
    border-radius: 3px;
    overflow: visible;
    margin-top:10px;
}

.persistent-help-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border: 1px solid #4CAF50; /* Green border */
    border-radius: 3px;
    animation: photoshopDragSpan 2.5s ease-out infinite;
    z-index: 1;
}

.persistent-help-message::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #4CAF50 40%, rgba(76, 175, 80, 0.6) 60%, transparent 80%);
    border-radius: 50%;
    opacity: 0;
    animation: dragCursorSpan 2.5s ease-out infinite;
    z-index: 2;
}

@keyframes photoshopDragSpan {
    0% {
        width: 0;
        height: 0;
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    100% {
        width: 100%;
        height: 100%;
        opacity: 1;
    }
}

@keyframes dragCursorSpan {
    0% {
        top: -2px;
        left: -2px;
        opacity: 1;
    }
    85% {
        opacity: 0.8;
    }
    100% {
        top: calc(100% + 2px);
        left: calc(100% + 2px);
        opacity: 0;
    }
}

.circle-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background-color: #4CAF50;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    margin: 0 3px;
    vertical-align: middle;
}