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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 2000px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1em;
    opacity: 0.95;
}

.main-content {
    display: flex;
    gap: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    min-height: calc(100vh - 100px);
    height: auto;
}

.controls-panel {
    width: 350px;
    padding: 25px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    max-height: 85vh;
    overflow-y: auto;
}

.controls-panel h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.4em;
}

.control-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.control-section:last-child {
    border-bottom: none;
}

.control-section h3 {
    color: #555;
    margin-bottom: 15px;
    font-size: 1.1em;
    font-weight: 600;
}

.control-group {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group label {
    flex: 1;
    font-size: 0.95em;
    color: #666;
}

.control-group input[type="number"],
.control-group select {
    width: 100px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.95em;
    background: white;
}

.control-group input[type="checkbox"] {
    width: auto;
    margin-right: 5px;
}

.unit {
    width: 30px;
    font-size: 0.85em;
    color: #999;
}

.calculate-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 20px 0;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.calculate-btn:active {
    transform: translateY(0);
}

/* Tracer Upload Section */
.tracer-upload-section {
    margin-bottom: 15px;
    padding: 10px;
    background: linear-gradient(135deg, #e8f4fc 0%, #f0f8ff 100%);
    border-radius: 8px;
    border: 1px dashed #667eea;
}

.tracer-upload-btn {
    width: 100%;
    padding: 10px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tracer-upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.tracer-upload-btn .btn-icon {
    font-size: 1.1em;
}

.tracer-file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding: 8px 12px;
    background: #d4edda;
    border-radius: 5px;
    border: 1px solid #28a745;
}

.tracer-file-info span {
    font-size: 0.85em;
    color: #155724;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.clear-tracer-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 0.8em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.clear-tracer-btn:hover {
    background: #c82333;
}

/* Disabled state for frame fields when tracer is loaded */
.frame-field-disabled {
    opacity: 0.6;
    pointer-events: none;
    background: #e9ecef !important;
}

.frame-field-disabled input,
.frame-field-disabled select {
    background: #e9ecef !important;
    cursor: not-allowed;
}

/* Action buttons container */
.action-buttons {
    margin: 20px 0;
}

.secondary-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.secondary-btn {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.new-calc-btn {
    background: #f44336;
    color: white;
}

.new-calc-btn:hover {
    background: #d32f2f;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(244, 67, 54, 0.3);
}

.download-btn {
    background: #4CAF50;
    color: white;
}

.download-btn:hover {
    background: #388e3c;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
}

.download-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.statistics {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.statistics h3 {
    color: #667eea;
    margin-bottom: 12px;
    font-size: 1.1em;
}

.stats-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.eye-stats {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.eye-stats h4 {
    color: #555;
    margin-bottom: 10px;
    font-size: 1em;
    font-weight: 600;
}

.eye-stats#stats-od {
    border-left-color: #4CAF50;
}

.eye-stats#stats-os {
    border-left-color: #2196F3;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    padding: 3px 0;
    border-bottom: 1px solid #e8e9ea;
}

.stat-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.stat-label {
    color: #666;
    font-size: 0.85em;
}

.stat-value {
    font-weight: 600;
    color: #333;
    font-size: 0.85em;
}

.visualization-area {
    flex: 3;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-width: 750px;
    position: relative;
}

#canvas-container {
    position: relative;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    min-height: 350px;
    height: calc((100vh - 180px) * 0.7);
    max-height: 450px;
    border: 1px solid #e0e0e0;
}

#canvas-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-size: 1.1em;
    color: #667eea;
    display: none;
}

.loading.active {
    display: block;
}

/* OC Warning Overlay */
.oc-warning-overlay {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: none;
}

.oc-warning-content {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: pulse-warning 1.5s ease-in-out infinite;
}

.oc-warning-icon {
    font-size: 1.5em;
}

.oc-warning-text {
    font-weight: bold;
    font-size: 1.1em;
    letter-spacing: 1px;
}

@keyframes pulse-warning {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

.view-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
    padding: 10px 0;
    position: relative;
    z-index: 100;
    flex-shrink: 0;
    background: white;
}

.view-controls button {
    padding: 8px 20px;
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.view-controls button:hover {
    background: #667eea;
    color: white;
}

/* Scrollbar styling */
.controls-panel::-webkit-scrollbar {
    width: 8px;
}

.controls-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.controls-panel::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.controls-panel::-webkit-scrollbar-thumb:hover {
    background: #5569d0;
}

/* Prism section styles */
.prism-section {
    margin-top: 10px;
    padding: 10px;
    background: #f0f2f5;
    border-radius: 6px;
}

.prism-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.prism-header label {
    font-size: 0.95em;
    color: #666;
    min-width: 50px;
}

.prism-mode-select {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85em;
    background: white;
}

.prism-inputs {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #ddd;
}

.prism-inputs .control-group {
    margin-bottom: 8px;
}

.prism-inputs .control-group label {
    font-size: 0.85em;
}

.prism-inputs input,
.prism-inputs select {
    width: 80px !important;
    padding: 4px 6px;
    font-size: 0.85em;
}

/* Base curve suggestion styles */
.base-curve-group {
    flex-wrap: wrap;
}

.base-curve-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.suggest-btn {
    padding: 4px 10px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.8em;
    cursor: pointer;
    transition: background 0.2s;
}

.suggest-btn:hover {
    background: #5569d0;
}

.recommendation-box {
    margin-top: 8px;
    padding: 8px 12px;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.recommendation-label {
    font-size: 0.85em;
    color: #2e7d32;
}

.recommendation-value {
    font-weight: 600;
    color: #1b5e20;
    font-size: 0.95em;
}

.recommendation-info {
    font-size: 0.75em;
    color: #666;
    font-style: italic;
}

.apply-btn {
    padding: 3px 10px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 0.8em;
    cursor: pointer;
    margin-left: auto;
}

.apply-btn:hover {
    background: #388e3c;
}

/* Validation box styles */
.validation-box {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.85em;
}

.validation-box.error {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    color: #c62828;
}

.validation-box.warning {
    background: #fff3e0;
    border: 1px solid #ffcc80;
    color: #e65100;
}

.validation-box div {
    margin-bottom: 4px;
}

.validation-box div:last-child {
    margin-bottom: 0;
}

/* Guidance text styles */
.guidance-text {
    margin-top: 4px;
    padding: 6px 10px;
    background: #e3f2fd;
    border-radius: 4px;
    font-size: 0.8em;
    color: #1565c0;
}

/* Balance section styles */
.balance-section {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.balance-section h3 {
    color: #667eea;
    margin-bottom: 12px;
    font-size: 1.1em;
}

.balance-warnings {
    margin-bottom: 12px;
}

.balance-warning {
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.balance-warning:last-child {
    margin-bottom: 0;
}

.balance-warning.success {
    background: #e8f5e9;
    border-left: 4px solid #4CAF50;
}

.balance-warning.info {
    background: #e3f2fd;
    border-left: 4px solid #2196F3;
}

.balance-warning.warning {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
}

.balance-warning.error {
    background: #ffebee;
    border-left: 4px solid #f44336;
}

.warning-title {
    font-weight: 600;
    font-size: 0.9em;
    margin-bottom: 4px;
}

.balance-warning.success .warning-title {
    color: #2e7d32;
}

.balance-warning.info .warning-title {
    color: #1565c0;
}

.balance-warning.warning .warning-title {
    color: #e65100;
}

.balance-warning.error .warning-title {
    color: #c62828;
}

.warning-message {
    font-size: 0.85em;
    color: #555;
    margin-bottom: 4px;
}

.warning-suggestion {
    font-size: 0.8em;
    color: #777;
    font-style: italic;
}

.balance-metrics {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    padding: 3px 0;
}

.metric-item:last-child {
    margin-bottom: 0;
}

.metric-label {
    font-size: 0.85em;
    color: #666;
}

.metric-value {
    font-weight: 600;
    font-size: 0.85em;
    color: #333;
}

/* Prism stat item */
.prism-stat {
    background: #f3e5f5;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 6px;
}

/* Calculated values section */
.calculated-values-section {
    background: #f0f8ff;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

.calculated-values-section h3 {
    color: #1565c0;
    margin-bottom: 8px;
}

.section-note {
    font-size: 0.8em;
    color: #666;
    font-style: italic;
    margin-bottom: 12px;
}

.eye-calculated {
    background: white;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
}

.eye-calculated:last-child {
    margin-bottom: 0;
}

#calculated-od {
    border-left-color: #4CAF50;
}

#calculated-os {
    border-left-color: #2196F3;
}

.eye-calculated h4 {
    color: #555;
    margin-bottom: 8px;
    font-size: 0.95em;
    font-weight: 600;
}

.calc-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    padding: 3px 0;
    border-bottom: 1px solid #e8e9ea;
}

.calc-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.calc-label {
    color: #666;
    font-size: 0.85em;
}

.calc-value {
    font-weight: 600;
    color: #1565c0;
    font-size: 0.85em;
}

.calc-value.adjusted {
    color: #e65100;
}

.calc-note {
    font-size: 0.75em;
    color: #888;
    margin-left: 5px;
}

/* Constraint warnings in calculated values */
.constraint-warnings {
    margin-top: 8px;
}

.constraint-warning {
    padding: 8px 10px;
    border-radius: 5px;
    margin-top: 6px;
    font-size: 0.85em;
}

.constraint-warning.error {
    background: #ffebee;
    border-left: 3px solid #f44336;
}

.constraint-warning.warning {
    background: #fff3e0;
    border-left: 3px solid #ff9800;
}

.constraint-warning.success {
    background: #e8f5e9;
    border-left: 3px solid #4CAF50;
}

.constraint-warning .constraint-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.constraint-warning.error .constraint-title {
    color: #c62828;
}

.constraint-warning.warning .constraint-title {
    color: #e65100;
}

.constraint-warning.success .constraint-title {
    color: #2e7d32;
}

.constraint-warning .constraint-message {
    color: #555;
    margin-bottom: 4px;
}

.constraint-warning .constraint-difference {
    font-weight: 500;
    margin-bottom: 4px;
}

.constraint-warning.error .constraint-difference {
    color: #c62828;
}

.constraint-warning .constraint-suggestion {
    font-style: italic;
    color: #666;
    font-size: 0.9em;
}

.calc-value.not-achieved {
    color: #c62828;
    font-weight: 700;
}

.calc-value.achieved {
    color: #2e7d32;
}

/* Base curve selector styles */
.base-curve-selector {
    flex-direction: column;
    align-items: flex-start !important;
}

.base-curve-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 5px;
}

.bc-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #ff9800, #4CAF50);
    border-radius: 3px;
    outline: none;
}

.bc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.bc-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.bc-input {
    width: 60px !important;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
    text-align: center;
}

.base-curve-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 4px;
    width: 100%;
}

.bc-range {
    font-size: 0.8em;
    color: #666;
}

.bc-range span {
    font-weight: 600;
    color: #333;
}

#bc_min_od, #bc_min_os {
    color: #ff9800;
}

#bc_ideal_od, #bc_ideal_os {
    color: #4CAF50;
}

.bc-note {
    font-size: 0.75em;
    color: #888;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }

    .controls-panel {
        width: 100%;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .thickness-explorer-panel {
        width: 100%;
        border-left: none;
        border-top: 1px solid #e0e0e0;
    }

    .explorer-container {
        flex-direction: row;
        justify-content: center;
    }
}

/* Edge Thickness Explorer Panel */
.thickness-explorer-panel {
    width: 280px;
    min-width: 280px;
    padding: 15px;
    background: #1a1a2e;
    border-left: 1px solid #333;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.thickness-explorer-panel h2 {
    color: #00d4ff;
    font-size: 1.1em;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 2px solid #00d4ff;
    padding-bottom: 8px;
}

.explorer-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.lens-explorer {
    background: #0d0d1a;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #333;
}

.lens-explorer canvas {
    display: block;
    margin: 0 auto;
    background: #000;
    border-radius: 5px;
    cursor: crosshair;
}

.angle-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 6px;
    background: #16213e;
    border-radius: 5px;
}

.angle-label {
    color: #888;
    font-size: 0.85em;
}

.angle-value {
    color: #00ff88;
    font-size: 1.2em;
    font-weight: bold;
    font-family: 'Consolas', monospace;
}

.angle-unit {
    color: #666;
    font-size: 0.85em;
}

.thickness-results {
    background: #0d0d1a;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #333;
}

.thickness-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 5px;
    background: #16213e;
    border-radius: 5px;
}

.thickness-row:last-child {
    margin-bottom: 0;
}

.eye-label {
    font-size: 0.9em;
    font-weight: bold;
}

.od-label {
    color: #00d4ff;
}

.os-label {
    color: #ff6b9d;
}

.thickness-value {
    color: #ffcc00;
    font-size: 1.3em;
    font-weight: bold;
    font-family: 'Consolas', monospace;
}

.thickness-unit {
    color: #666;
    font-size: 0.85em;
}

.explorer-instructions {
    text-align: center;
    color: #666;
    font-size: 0.75em;
    margin-top: 10px;
    font-style: italic;
}

/* Fixed Position Buttons */
.fixed-btn {
    position: fixed;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.fixed-btn .btn-icon {
    font-size: 1.2em;
    font-weight: bold;
}

.fixed-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.fixed-btn:active {
    transform: translateY(0);
}

/* New Calculation Button - Top Left */
.new-calc-fixed {
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
}

.new-calc-fixed:hover {
    background: linear-gradient(135deg, #ff5252 0%, #d63031 100%);
    box-shadow: 0 6px 25px rgba(238, 90, 36, 0.4);
}

/* Download PDF Button - Bottom Right */
.download-fixed {
    bottom: 80px;
    right: 30px;
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
    color: white;
}

.download-fixed:hover {
    background: linear-gradient(135deg, #00cec9 0%, #00b894 100%);
    box-shadow: 0 6px 25px rgba(0, 184, 148, 0.4);
}

.download-fixed:disabled {
    background: linear-gradient(135deg, #636e72 0%, #b2bec3 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Render Button Container - Top of Visualization */
.render-btn-container {
    display: flex;
    justify-content: center;
    padding: 10px 0;
    margin-bottom: 10px;
    flex-shrink: 0;
}

/* Artistic Calculate & Render Button */
.render-btn {
    position: relative;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.render-btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(102, 126, 234, 0.4) 0%, transparent 70%);
    filter: blur(15px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.render-btn:hover .render-btn-glow {
    opacity: 1;
}

.render-btn-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: 2px solid transparent;
    border-radius: 50px;
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    letter-spacing: 0.5px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-clip: padding-box;
}

.render-btn-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50px;
    padding: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #00d4ff 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.render-btn:hover .render-btn-content {
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 50%, #0f3460 100%);
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.3), 0 0 60px rgba(118, 75, 162, 0.2);
}

.render-btn:hover {
    transform: scale(1.02);
}

.render-btn:active {
    transform: scale(0.98);
}

.render-icon {
    width: 24px;
    height: 24px;
    stroke: #00d4ff;
    transition: all 0.3s ease;
}

.render-btn:hover .render-icon {
    stroke: #667eea;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.render-text {
    background: linear-gradient(90deg, #667eea, #764ba2, #00d4ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.render-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50px;
    background: transparent;
    border: 2px solid rgba(102, 126, 234, 0.5);
    opacity: 0;
    pointer-events: none;
}

.render-btn:hover .render-pulse {
    animation: pulse-ring 1.5s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0;
    }
}