@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

@font-face {
    font-family: "RohnRounded-HeavyItalic";
    src: url("RohnRounded-HeavyItalic.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #363636;
    color: #d4d4d4;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding-top: 2rem;
    overflow-x: hidden;
}

.main-container {
    background-color: #444444;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    display: grid;
    gap: 2rem;
    grid-template-areas:
        "header header"
        "editor controls";
    grid-template-columns: auto auto;
    width: fit-content;
    position: relative;
}

@media (max-width: 1024px) {
    .main-container {
        grid-template-areas:
            "header"
            "editor"
            "controls";
        grid-template-columns: 1fr;
    }
}

.editor-area {
    grid-area: editor;
    background-color: #313131;
    padding: 0;
    border-radius: 0.75rem;
    position: relative;
    overflow: hidden;
    height: 1024px;
    width: 1024px;
}

/* 1:1 Zoom mode - shows full 2048px content in scrollable viewport */
.editor-area.zoom-1to1 {
    overflow: auto;
    cursor: grab;
}

.editor-area.zoom-1to1.panning {
    cursor: grabbing;
}

.editor-area.zoom-1to1 #skin-svg-container {
    transform: none; /* Remove scale(0.5) to show at 1:1 */
}

#skin-svg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 2048px;
    height: 2048px;
    transform: scale(0.5);
    transform-origin: top left;
}

.color-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: #ffffff;
}

.poster-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.poster-background svg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.text-overlays {
    position: absolute;
    top: 0;
    left: 0;
    width: 2048px;
    height: 2048px;
    z-index: 10;
    pointer-events: none;
}

#skin-svg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
}

.controls-area {
    grid-area: controls;
    background-color: #313131;
    padding: 1rem;
    border-radius: 0.75rem;
    width: 520px;
    height: 1024px; /* Match editor-area height */
    overflow-y: auto; /* Allow scrolling if content exceeds height */
}

.control-group {
    margin-bottom: 0.9rem;
}

/* Layer toggle buttons */
.layer-toggle-btn {
    background-color: #555;
    color: #888;
    border: 2px solid #666;
    font-weight: 600;
}

.layer-toggle-btn:hover {
    background-color: #666;
}

.layer-toggle-btn.active {
    background-color: #3b82f6;
    color: white;
    border-color: #2563eb;
}

.layer-toggle-btn.active:hover {
    background-color: #2563eb;
}

.layer-opacity-control {
    padding: 0.3rem 0;
}

.opacity-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: linear-gradient(to right, #3b82f6, #555, #10b981);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.opacity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #d4d4d4;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #888;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.opacity-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #d4d4d4;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #888;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Color Controls */
.color-inputs-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.color-preview-box {
    width: 60px;
    height: 40px;
    border-radius: 6px;
    border: 2px solid #666;
    background-color: #ffffff;
}

.eyedropper-btn {
    width: 60px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #555;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #d4d4d4;
    transition: background-color 0.2s;
}

.eyedropper-btn:hover {
    background-color: #666;
}

.hex-input {
    width: 60px;
    padding: 4px 6px;
    background-color: #363636;
    border: 1px solid #555;
    border-radius: 4px;
    color: #d4d4d4;
    font-family: monospace;
    font-size: 12px;
    text-align: center;
    text-transform: uppercase;
}

.hidden-color-picker {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

/* Toggle Switch Styles */
.toggle-switch-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 22px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: 0.3s;
    border-radius: 22px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #d4d4d4;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #4a9eff;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* Box control buttons (Download, Save to Server) */
.box-control-btn {
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    transition: background-color 0.2s;
}

/* Download buttons */
.download-btn {
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.2s, transform 0.1s;
    cursor: pointer;
    border: none;
}

.download-btn:hover {
    transform: translateY(-1px);
}

.download-btn:active {
    transform: translateY(0);
}

.download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.download-skin-btn {
    background-color: #dc2626;
}

.download-skin-btn:hover:not(:disabled) {
    background-color: #b91c1c;
}

.download-overlay-btn {
    background-color: #dc2626;
}

.download-overlay-btn:hover:not(:disabled) {
    background-color: #b91c1c;
}

/* Inline Color Wheel */
.color-wheel-inline {
    position: relative;
    width: 117px;
    height: 117px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#colorWheelCanvas {
    width: 117px;
    height: 117px;
    border-radius: 50%;
    cursor: crosshair;
}

.color-wheel-cursor {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid white;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.3);
}

.color-sliders {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.color-slider-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.slider-label {
    width: 20px;
    font-weight: 600;
    color: #d4d4d4;
    text-align: center;
}

.color-channel-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 12px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
}

.color-channel-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #888;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.color-channel-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #888;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.red-slider {
    background: linear-gradient(to right, #000, #ff0000);
}

.green-slider {
    background: linear-gradient(to right, #000, #00ff00);
}

.blue-slider {
    background: linear-gradient(to right, #000, #0000ff);
}

.channel-input {
    width: 45px;
    background-color: #363636;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 4px 6px;
    color: #d4d4d4;
    text-align: center;
}

.channel-input::-webkit-inner-spin-button,
.channel-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.channel-input[type=number] {
    -moz-appearance: textfield;
}

.advanced-controls {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.advanced-controls.expanded {
    max-height: 1000px;
    opacity: 1;
}

.toggle-switch-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ef4444;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #22c55e;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.color-preview {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    border: 1px solid #666;
}

.info-box {
    background-color: #2b2b2b;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    word-break: break-all;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

input[type="range"] {
    width: 100%;
}

.hidden {
    display: none;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
    width: 100%;
}

.control-label {
    flex: 1;
    display: flex;
    align-items: center;
    margin: 0 5px;
}

.label-text {
    width: 80px;
    display: inline-block;
}

.control-label input[type="range"] {
    flex: 1;
    width: auto;
}

.position-input {
    width: 70px;
    background-color: #363636;
    border: 1px solid #555;
    border-radius: 0.25rem;
    padding: 0.25rem;
    color: #d4d4d4;
}

.number-input-compact {
    width: 4.5ch; /* Width for 3 digits (8/9 are widest) + 30% */
    text-align: center;
}

.step-button {
    width: 30px;
    height: 30px;
    background-color: #555;
    color: #fff;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.step-button:hover {
    background-color: #666;
}

.step-button:active {
    background-color: #444;
}

/* Text Container Positioning (scaled to 50% for 1024x1024 display) */
/* Based on BB457A.svg coordinates */
/* Common styles for all text containers */
.Windshield_Name_Container,
.Windshield_Number_Container,
.Door_Banner_Left_Number_Container,
.Door_Banner_Right_Number_Container,
.Dashboard_Name_Container,
.Dashboard_Number_Container {
    transform-origin: center;
}

.Windshield_Name_Container {
    position: absolute;
    overflow: visible; /* Changed to visible to allow curved borders */
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translate(-50%, -50%);
    z-index: 28;
    --dx-ratio: -0.02;
    --dy-ratio: -0.07;
}

.Windshield_Number_Container {
    position: absolute;
    overflow: visible; /* Changed to visible to allow curved borders */
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translate(-50%, -50%);
    z-index: 27;
    --dx-ratio: -0.02;
    --dy-ratio: -0.02;
}

.Door_Banner_Left_Number_Container {
    position: absolute;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translate(-50%, -50%);
    --dx-ratio: -0.04;
    --dy-ratio: -0.01;
    z-index: 26;
}

.Door_Banner_Right_Number_Container {
    position: absolute;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translate(-50%, -50%);
    --dx-ratio: -0.04;
    --dy-ratio: -0.01;
    z-index: 25;
}

.Dashboard_Name_Container {
    position: absolute;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translate(-50%, -50%);
    --dx-ratio: -0.09;
    --dy-ratio: -0.02;
    z-index: 24;
}

.Dashboard_Number_Container {
    position: absolute;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translate(-50%, -50%);
    --dx-ratio: 0;
    --dy-ratio: 0;
    z-index: 23;
}

/* Show borders on containers when enabled */
.show-border {
    outline: 2px solid #ff0000 !important;
}

/* Hide default outline for Windshield containers when borders are shown (we use SVG border instead) */
.Windshield_Name_Container.show-border,
.Windshield_Number_Container.show-border {
    outline: none !important;
}

/* Show SVG border when container has .show-border */
.show-border .box-outline {
    stroke: #ff0000;
    stroke-width: 2px;
    fill: none;
    opacity: 1;
}

/* Default state for SVG border */
.box-outline {
    stroke: none;
    fill: none;
    opacity: 0;
    pointer-events: none;
}

/* SVG Text Element Styles - Base Template (car-specific values loaded from JSON) */
.Windshield_Name,
.Windshield_Number,
.Door_Banner_Left_Number,
.Door_Banner_Right_Number,
.Dashboard_Name,
.Dashboard_Number {
    width: 100%;
    height: 100%;
    overflow: visible;
    white-space: nowrap;
    /* fontSize, color, and curvature are applied dynamically via SVG attributes */
}

/* SVG text styling */
.Windshield_Name text,
.Windshield_Number text,
.Door_Banner_Left_Number text,
.Door_Banner_Right_Number text,
.Dashboard_Name text,
.Dashboard_Number text {
    font-family: "RohnRounded-HeavyItalic", sans-serif;
    transform-origin: center;
}

/* ========================================
   Interactive Container Manipulation
   ======================================== */

/* Enable pointer events on text overlays for interaction */
.text-overlays.interactive {
    pointer-events: auto;
}

/* All containers should be clickable when interactive mode is on */
.text-overlays.interactive > div {
    pointer-events: auto;
    cursor: pointer;
}

/* Child elements should not block container clicks (pass through to container) */
.text-overlays.interactive > div > * {
    pointer-events: none;
}

/* But handles should still be clickable */
.text-overlays.interactive .manipulation-handle {
    pointer-events: auto;
}

/* Container selection state */
.container-selected {
    pointer-events: auto;
    cursor: move;
    overflow: visible !important; /* Allow rotation handle to show above container */
}

/* Handle wrapper - contains all manipulation handles */
.handle-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* Base handle style */
.manipulation-handle {
    position: absolute;
    pointer-events: auto;
    box-sizing: border-box;
}

/* Resize handles - corners and edges */
.resize-handle {
    width: 12px;
    height: 12px;
    background: #ffffff;
    border: 2px solid #0088ff;
    border-radius: 2px;
    z-index: 1001;
}

.resize-handle.corner {
    border-radius: 50%;
}

/* Corner handles */
.resize-handle.nw { top: -6px; left: -6px; cursor: nwse-resize; }
.resize-handle.ne { top: -6px; right: -6px; cursor: nesw-resize; }
.resize-handle.se { bottom: -6px; right: -6px; cursor: nwse-resize; }
.resize-handle.sw { bottom: -6px; left: -6px; cursor: nesw-resize; }

/* Edge handles */
.resize-handle.n { top: -6px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.resize-handle.s { bottom: -6px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.resize-handle.e { top: 50%; right: -6px; transform: translateY(-50%); cursor: ew-resize; }
.resize-handle.w { top: 50%; left: -6px; transform: translateY(-50%); cursor: ew-resize; }

/* Rotation handle */
.rotation-handle {
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: #ffffff;
    border: 2px solid #00cc66;
    border-radius: 50%;
    cursor: grab;
    z-index: 1002;
}

.rotation-handle:active {
    cursor: grabbing;
}

/* Rotation handle connector line */
.rotation-handle::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    width: 2px;
    height: 48px;
    background: #00cc66;
    transform: translateX(-50%);
    pointer-events: none;
}

/* Curvature handle - for Windshield elements only */
.curvature-handle {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: #ffcc00;
    border: 2px solid #cc9900;
    border-radius: 50%;
    cursor: ns-resize;
    z-index: 1003;
}

/* Move handle (center of container) - visual indicator */
.move-indicator {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: transparent;
    border: 2px dashed rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 999;
}

/* Selection outline */
.selection-outline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px dashed #0088ff;
    pointer-events: none;
    box-sizing: border-box;
}

/* Handle hover effects */
.resize-handle:hover {
    background: #0088ff;
    border-color: #ffffff;
}

.rotation-handle:hover {
    background: #00cc66;
    border-color: #ffffff;
}

.curvature-handle:hover {
    background: #cc9900;
    border-color: #ffffff;
}

/* Dragging state */
body.dragging-resize,
body.dragging-resize * {
    cursor: nwse-resize !important;
}

body.dragging-rotate,
body.dragging-rotate * {
    cursor: grabbing !important;
}

body.dragging-move,
body.dragging-move * {
    cursor: move !important;
}

body.dragging-curvature,
body.dragging-curvature * {
    cursor: ns-resize !important;
}

/* Upload Notification Toast */
.upload-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 50;
    animation: slideInUp 0.3s ease-out;
}

.upload-notification.hidden {
    display: none;
}

.upload-notification.hiding {
    animation: slideOutDown 0.3s ease-in;
}

.upload-notification-content {
    background: #1a1a1a;
    border: 2px solid #087BBE;
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-width: 640px;
    max-width: 800px;
    box-shadow: 0 0 30px rgba(8, 123, 190, 0.5), 0 10px 40px rgba(0, 0, 0, 0.8);
}

.upload-notification-text {
    flex: 1;
}

.upload-notification-message {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 0 1rem 0;
}

.upload-notification-link {
    color: #087BBE;
    font-size: 1.25rem;
    font-weight: bold;
    text-decoration: underline;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.upload-notification-link:hover {
    color: #0a9fee;
}

.upload-notification-close {
    color: #888;
    background: none;
    border: none;
    font-size: 3rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.upload-notification-close:hover {
    color: #ffffff;
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100px);
        opacity: 0;
    }
}

/* Permission Dialog */
.permission-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.permission-dialog.hidden {
    display: none;
}

.permission-dialog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease-out;
}

.permission-dialog-content {
    position: relative;
    background: #1a1a1a;
    border: 2px solid #087BBE;
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 0 30px rgba(8, 123, 190, 0.5), 0 10px 40px rgba(0, 0, 0, 0.8);
    animation: slideInUp 0.3s ease-out;
    z-index: 101;
}

.permission-dialog-title {
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: bold;
    margin: 0 0 1rem 0;
    text-align: center;
}

.permission-dialog-message {
    color: #d4d4d4;
    font-size: 1.125rem;
    margin: 0 0 1.5rem 0;
    text-align: center;
    line-height: 1.5;
}

.permission-checkbox-container {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #2a2a2a;
    border-radius: 8px;
}

.permission-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    color: #d4d4d4;
    font-size: 0.95rem;
    line-height: 1.5;
}

.permission-checkbox {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.permission-dialog-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.permission-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.permission-btn-decline {
    background: #555;
    color: #d4d4d4;
}

.permission-btn-decline:hover {
    background: #666;
}

.permission-btn-approve {
    background: #087BBE;
    color: #ffffff;
}

.permission-btn-approve:hover {
    background: #0a9fee;
}

.permission-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.permission-status {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
}

.permission-status.hidden {
    display: none;
}

.permission-status.success {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid #22c55e;
}

.permission-status.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid #ef4444;
}

.permission-status.info {
    background: rgba(8, 123, 190, 0.2);
    color: #087BBE;
    border: 1px solid #087BBE;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Custom Alert Dialog */
.custom-alert-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-alert-dialog.hidden {
    display: none;
}

.custom-alert-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease-out;
}

.custom-alert-content {
    position: relative;
    background: #1a1a1a;
    border: 2px solid #dc2626;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.5), 0 10px 40px rgba(0, 0, 0, 0.8);
    animation: slideInUp 0.3s ease-out;
    z-index: 101;
}

.custom-alert-content.warning {
    border-color: #f59e0b;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.5), 0 10px 40px rgba(0, 0, 0, 0.8);
}

.custom-alert-content.info {
    border-color: #087BBE;
    box-shadow: 0 0 30px rgba(8, 123, 190, 0.5), 0 10px 40px rgba(0, 0, 0, 0.8);
}

.custom-alert-content.success {
    border-color: #16a34a;
    box-shadow: 0 0 30px rgba(22, 163, 74, 0.5), 0 10px 40px rgba(0, 0, 0, 0.8);
}

.custom-alert-title {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 0 1rem 0;
    text-align: center;
}

.custom-alert-message {
    color: #d4d4d4;
    font-size: 1rem;
    margin: 0 0 1.5rem 0;
    text-align: center;
    line-height: 1.5;
    white-space: pre-line;
}

.custom-alert-buttons {
    display: flex;
    justify-content: center;
}

.custom-alert-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: #087BBE;
    color: #ffffff;
    min-width: 100px;
}

.custom-alert-btn:hover {
    background: #0a9fee;
}

/* Easter egg optimization - smooth transforms for "67" animation */
.main-container {
    will-change: auto;
}
