/* CSS for Vizier Web App v1.6.0*/

/* 1. Settings - Design Tokens */
:root {
    --primary-dark: #0D1117;
    --secondary-dark: #161B22;
    --accent-gold: #D4AF37;
    --text-color: #E6E6E6;
    --border-color: #30363D;
    --user-accent: #40E0D0; /* Brilliant turquoise */
    --error-accent: #DC143C; /* Brilliant crimson */
    --error-glow: #ff7d97; /* Brighter crimson for glow effect */
    --vh: 1vh;
    --vw: 1vw;
    --padding-base: calc(var(--vh) * 1.5);
    --element-spacing: calc(var(--vh) * 0.5);
    --title-height: calc(var(--vh) * 4);
    --input-height: calc(var(--vh) * 6);
    --bottom-spacing: calc(var(--vh) * 15);
    --dot-color: rgba(212, 175, 55, 0.2);
    --footer-height: calc(var(--vh) * 6);
    --footer-space: calc(var(--vh) * 2);
    --input-container-height: calc(var(--vh) * 8);
    --keyboard-offset: calc(var(--vh) * 35);
    --keyboard-height: calc(var(--vh) * 35); /* Approximate iOS keyboard height */
    --input-slide: calc(var(--vh) * 8); /* Amount to slide input up */
    --particle-color: var(--accent-gold); /* Default particle color */
    --window-inner-height: 100vh; /* For iOS calculations */
    --background-pattern-opacity: 0.12;
}

/* 2. Generic Styles - Base Styles */
html {
    height: 100%;
    overflow: hidden;
}

body {
    background-color: #1a1a1a;
    color: var(--text-color);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: none;
    background-image:
        radial-gradient(circle at center, var(--dot-color) 1px, transparent 1.5px),
        radial-gradient(circle at center, #1a1a1a 0%, rgba(26, 26, 26, 0.3) 150%); 
    background-size: 10px 10px, 100% 100%;
    background-position: center center;
    padding-bottom: env(safe-area-inset-bottom);
    padding-bottom: constant(safe-area-inset-bottom);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    background-image: radial-gradient(
        circle at center, 
        var(--accent-gold) 1px, 
        transparent 1px);
    background-size: 8px 8px;
    background-position: center center;
    opacity: 0.15;
    pointer-events: none;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(
        circle at center,
        transparent 20%,
        var(--background) 70%);
    pointer-events: none;
    z-index: -1;
}

/* 3. Layouts - Page Structure */
#main-container {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(90%, 800px);
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: rgb(22 27 34);
    overflow: hidden;
}

.container {
    max-width: 1200px;
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: auto;
    /* padding: var(--padding-base); */
    box-sizing: border-box;
    gap: var(--element-spacing);
    position: relative;
    margin-bottom: calc(var(--padding-base) * 0.5);
    min-height: calc(100vh - (var(--padding-base) * 1.5));
    overflow: hidden;
    touch-action: none;
    z-index: 1;
    box-shadow: none;
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
}

@supports not (backdrop-filter: blur(10px)) {
    .container {
        background: rgba(26, 26, 26, 0.05);
    }
}

@media (max-width: 480px) {
    .container {
        width: 90%;
        margin-bottom: calc(var(--padding-base) * 0.25);
    }
}

.footer-space {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(var(--vh) * 1);
    pointer-events: none;
    overflow: hidden;
}

/* 4. Modules - Reusable Components */
.title-container {
    margin-top: 0;
    padding-top: calc(var(--padding-base) * 0.5);
    position: relative;
    height: var(--title-height);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    gap: calc(var(--vw) * 2);
    z-index: 2;
}

.title {
    font-size: calc(var(--vh) * 3);
    line-height: var(--title-height);
    margin: 0;
    padding: 0 calc(var(--vw) * 3);
    color: var(--accent-gold);
    position: relative;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.title-decoration {
    display: flex;
    align-items: center;
    gap: calc(var(--vw) * 2);
}

.title-line {
    height: 2px;
    width: calc(var(--vw) * 12);
    background: linear-gradient(90deg, transparent, var(--accent-gold) 20%, var(--accent-gold) 80%, transparent);
}

.title-diamond {
    color: var(--accent-gold);
    font-size: calc(var(--vh) * 1.8);
    opacity: 0.8;
    line-height: 0.7;
}

.diamond-cluster {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: var(--title-height);
    transform: translateY(1px);
}

.diamond-row {
    display: flex;
    gap: 3px;
    transform: translateY(-1px);
}

.single-diamond {
    margin-bottom: -1px;
}

.chat-container {
    position: relative;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1;
    padding: var(--padding-base);
    margin: 0;
    contain: content;
    transform: translateZ(0);
    display: flex;
    flex-direction: column;
}

.chat-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 100%;
    height: 100%;
    background: var(--secondary-dark);
    border-radius: 8px;
    z-index: -1;
    position: fixed;
    width: 100%;
    transform: translateZ(0);
}

.chat-container::-webkit-scrollbar {
    width: 8px;
    background: transparent;
    position: absolute;
    right: 0;
}

.chat-container::-webkit-scrollbar-track {
    background: rgba(13, 17, 23, 0.3);
    border-radius: 4px;
    margin: 4px;
}

.chat-container::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    opacity: 1;
    background: linear-gradient(135deg, var(--accent-gold) 0%, rgba(212, 175, 55, 0.8) 100%);
    border: 1px solid transparent;
}

/* Input container styling */
.input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--vh) * 1.5) 0;
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom) + 45px);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(13, 17, 23, 0.85) 0%, rgba(13, 17, 23, 0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(64, 224, 208, 0.15);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    padding-bottom: max(calc(var(--vh) * 1.5), var(--safe-area-bottom));
}

.chat-tools {
    display: none;
}

.input-wrapper {
    position: relative;
    width: 95%;
    min-width: 0;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    isolation: isolate;
    gap: 8px;
}

textarea {
    width: 100%;
    padding: 12px 52px;
    min-width: 0;
    background: rgba(22, 27, 34, 0.7);
    border: 1px solid rgba(64, 224, 208, 0.3);
    border-radius: 16px;
    color: var(--text-color);
    font-size: 15px;
    line-height: 1.5;
    resize: none;
    height: 44px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* Customize scrollbar for Webkit browsers */
textarea::-webkit-scrollbar {
    width: 6px;
}

textarea::-webkit-scrollbar-track {
    background: transparent;
}

textarea::-webkit-scrollbar-thumb {
    background-color: var(--user-accent);
    border-radius: 3px;
    border: 2px solid transparent;
}

/* Ensure text aligns to bottom when scrolling */
textarea.scrolling {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

textarea:hover,
textarea:focus {
    outline: none;
    border-color: var(--user-accent);
    background: rgba(22, 27, 34, 0.9);
    box-shadow: 0 4px 12px rgba(64, 224, 208, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

textarea::placeholder {
    color: rgba(230, 230, 230, 0.4);
    font-style: italic;
}

button {
    cursor: pointer;
    border: none;
    padding: 0;
    background: none;
    outline: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    -webkit-focus-ring-color: transparent;
    scroll-behavior: auto;
    scroll-snap-align: none;
    transform: translateZ(0);
    outline: none !important;
}

/* Specific styling for the send button */
button.send-button {
    background: linear-gradient(135deg, var(--user-accent) 0%, rgba(64, 224, 208, 0.8) 100%);
    border: none;
    border-radius: 14px;
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease, filter 0.15s ease, background 0.3s ease;
    box-shadow: 0 2px 8px rgba(64, 224, 208, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    outline: none !important;
    transform: translateZ(0);
    will-change: transform, filter;
    backface-visibility: hidden;
    perspective: 1000px;
    position: relative;
    z-index: 1;
}

button.send-button:focus,
button.send-button:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    -webkit-focus-ring-color: transparent;
}

button.send-button.active {
    transform: translateZ(0) scale(0.95);
    filter: brightness(1.1);
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), filter 0.2s ease;
}

button.send-button.charged {
    transform: translateZ(0) scale(1.18);
    filter: brightness(1.3) drop-shadow(0 0 12px var(--accent-gold));
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

button.send-button::before {
    content: '';
    width: 42px;
    height: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%231a1a1a' stroke-width='1.42'%3E%3Ccircle cx='12' cy='12' r='10' opacity='0.6'/%3E%3Ccircle cx='12' cy='12' r='7' opacity='0.8'/%3E%3Ccircle cx='12' cy='12' r='4' opacity='1'/%3E%3Cpath d='M12 5v14M5 12h14' opacity='0.4'/%3E%3Cpath d='M7.5 7.5l9 9M16.5 7.5l-9 9' opacity='0.4'/%3E%3C/g%3E%3Cg fill='%231a1a1a' opacity='0.9'%3E%3Ccircle cx='12' cy='12' r='1.5'/%3E%3Ccircle cx='12' cy='6' r='0.8'/%3E%3Ccircle cx='12' cy='18' r='0.8'/%3E%3Ccircle cx='6' cy='12' r='0.8'/%3E%3Ccircle cx='18' cy='12' r='0.8'/%3E%3C/g%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    transform: translateZ(0);
    position: relative;
    z-index: 2;
    filter: brightness(1.7) drop-shadow(0 0 8px var(--accent-gold));
    backface-visibility: hidden;
}

button.send-button.charged::before {
    animation: jitter 0.2s infinite linear;
    filter: brightness(2.2) drop-shadow(0 0 15px var(--accent-gold));
    will-change: transform;
}

/* Attachment button styling */
button.tool-button {
    width: 36px;
    height: 36px;
    padding: 8px;
    background: rgba(64, 224, 208, 0.1);
    border: 1px solid rgba(64, 224, 208, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

button.tool-button:hover {
    background: rgba(64, 224, 208, 0.15);
    border-color: rgba(64, 224, 208, 0.3);
    transform: translateY(-1px);
}

button.tool-button:active {
    transform: translateY(1px);
}

button.tool-button svg {
    width: 20px;
    height: 20px;
    stroke: var(--user-accent);
    transition: all 0.2s ease;
}

button.tool-button:hover svg {
    stroke: var(--accent-gold);
}

button:hover {
    background: linear-gradient(135deg, rgba(64, 224, 208, 0.9) 0%, rgba(64, 224, 208, 0.7) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(64, 224, 208, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

button:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%231a1a1a' stroke-width='1.42'%3E%3Ccircle cx='12' cy='12' r='10' opacity='0.6'/%3E%3Ccircle cx='12' cy='12' r='7' opacity='0.8'/%3E%3Ccircle cx='12' cy='12' r='4' opacity='1'/%3E%3Cpath d='M12 5v14M5 12h14' opacity='0.4'/%3E%3Cpath d='M7.5 7.5l9 9M16.5 7.5l-9 9' opacity='0.4'/%3E%3C/g%3E%3Cg fill='%231a1a1a' opacity='0.9'%3E%3Ccircle cx='12' cy='12' r='1.5'/%3E%3Ccircle cx='12' cy='6' r='0.8'/%3E%3Ccircle cx='12' cy='18' r='0.8'/%3E%3Ccircle cx='6' cy='12' r='0.8'/%3E%3Ccircle cx='18' cy='12' r='0.8'/%3E%3C/g%3E%3C/svg%3E");
    transform: rotate(45deg);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

button:not(:hover)::before {
    transform: rotate(0deg);
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(64, 224, 208, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

button:active::before {
    transform: rotate(720deg) scale(0.9);
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 480px) {
    .input-container {
        padding: calc(var(--vh) * 1.2) calc(var(--vw) * 1);
    }
    
    .chat-tools {
        padding-left: 8px;
    }
    
    .input-wrapper {
        margin: 0 8px;
    } 
    
    textarea {
        font-size: 16px;
        padding: 10px 14px;
    }
}

.message {
    margin: 10px 0;
    display: flex;
    flex-direction: row;
    animation: fadeIn 0.3s ease-out;
}

.message.user {
    justify-content: flex-end;
}

.message:not(.user) {
    justify-content: flex-start;
}

.message-content {
    background: var(--secondary-dark);
    padding: 10px 15px;
    border-radius: 12px;
    display: inline-block;
    max-width: calc(85% - 15px);
    word-wrap: break-word;
    border: 1px solid transparent;
    text-align: left;
    overflow: hidden;
}

.message-content.vizier {
    border-color: var(--accent-gold);
}

.message.user .message-content {
    border-color: var(--user-accent);
    margin-left: 15px;
    max-width: 80%;
}

.message:not(.user) .message-content {
    margin-right: 15px;
    max-width: 85%;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    .title {
        margin: 10px 0;
    }
    .chat-container {
        height: calc(100% - 160px);
    }
    .message-content {
        max-width: 90%;
    }
}

@media (max-height: 600px) {
    :root {
        --title-height: calc(var(--vh) * 2);
    }
    .title {
        font-size: calc(var(--vh) * 1.5);
    }
}

.title-container::after {
    display: none;
}

@media (max-width: 480px) {
    .message:not(.user) .message-content {
        max-width: 90%;
    }
    .message.user .message-content {
        max-width: 85%;
    }
}

.message-content.error {
    border-color: var(--error-accent);
    position: relative;
    padding: 15px 20px;
    background: var(--secondary-dark);
    z-index: 1;
}

.message-content.error::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 15px;
    background: linear-gradient(90deg, var(--error-accent) 0%, var(--error-glow) 25%, var(--error-accent) 50%, var(--error-accent) 100%);
    background-size: 200% 100%;
    animation: borderTrace 1.777s linear infinite;
    z-index: -1;
    opacity: 1;
    filter: blur(1px);
    box-shadow: 0 0 10px var(--error-glow);
    pointer-events: none;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    padding: 2px;
}

.message-content.error::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 17px;
    background: linear-gradient(90deg, transparent 0%, var(--error-glow) 25%, transparent 50%, transparent 100%);
    background-size: 200% 100%;
    animation: borderTrace 1.777s linear infinite;
    z-index: -2;
    opacity: 0.5;
    filter: blur(3px);
    pointer-events: none;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    padding: 3px;
}

.particle-container {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform-origin: center center;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    perspective: 1000px;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    pointer-events: none;
    background: transparent;
    border-radius: 50%;
    width: 8px;
    height: 8px;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.particle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at center, var(--particle-color) 0%, rgba(255, 255, 255, 0.9) 35%, transparent 75%);
    animation: particleFade 0.75s ease-out forwards;
    filter: brightness(1.8) contrast(1.3);
    box-shadow: 0 0 15px var(--particle-color), 0 0 25px var(--particle-color), 0 0 35px var(--particle-color);
    mix-blend-mode: screen;
    transform: translateZ(0);
    will-change: transform;
    z-index: 1001;
}

button.charged ~ .particle-container .particle::before {
    filter: brightness(2.2) contrast(1.5);
    box-shadow: 0 0 20px var(--particle-color), 0 0 35px var(--particle-color), 0 0 50px var(--particle-color);
}

.particle-flash {
    position: fixed;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.3) 5%,
        rgba(255, 255, 255, 0.2) 15%,
        rgba(255, 255, 255, 0.1) 25%,
        rgba(255, 255, 255, 0.05) 35%,
        transparent 60%
    );
    animation: flashDome 0.7s cubic-bezier(0.28, 0.11, 0.32, 1) forwards;
    filter: brightness(1.1) blur(2px);
    mix-blend-mode: screen;
    box-shadow: 
        0 0 15px rgba(255, 255, 255, 0.3),
        inset 0 0 8px rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%) scale(1, 0.4);
    transform-origin: center;
    z-index: 1002;
    pointer-events: none;
    will-change: transform;
}

.particle-flash.charged {
    width: 80px;
    height: 80px;
    background: radial-gradient(ellipse at center,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.4) 5%,
        rgba(255, 255, 255, 0.3) 15%,
        rgba(255, 255, 255, 0.2) 25%,
        rgba(255, 255, 255, 0.1) 35%,
        rgba(255, 255, 255, 0.05) 45%,
        rgba(255, 255, 255, 0.02) 55%,
        transparent 70%
    );
    filter: brightness(1.3) blur(3px);
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 30px var(--accent-gold),
        inset 0 0 12px rgba(255, 255, 255, 0.3),
        inset 0 0 8px var(--accent-gold);
    transform: translate(-50%, -50%) scale(1, 0.4);
    transform-origin: center;
}

.particle.sparkle::before {
    background: radial-gradient(circle at center, rgba(255, 255, 255, 1) 0%, var(--particle-color) 45%, transparent 75%);
    box-shadow: 0 0 20px var(--particle-color), 0 0 35px var(--particle-color);
    filter: brightness(2) contrast(1.5);
}

button.charged ~ .particle-container .particle.sparkle::before {
    filter: brightness(2.5) contrast(1.8);
    box-shadow: 0 0 25px var(--particle-color), 0 0 45px var(--particle-color), 0 0 65px var(--particle-color);
}

@keyframes particleFade {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

@keyframes flashDome {
    0% {
        transform: translate(-50%, -50%) scale(0.2, 0.08);
        opacity: 1;
        filter: brightness(1.2) blur(1px);
    }
    50% {
        opacity: 0.7;
        filter: brightness(1.1) blur(2px);
    }
    100% {
        transform: translate(-50%, -50%) scale(3, 1.2);
        opacity: 0;
        filter: brightness(1) blur(3px);
    }
}

@keyframes flashDomeCharged {
    0% {
        transform: translate(-50%, -50%) scale(0.2, 0.08);
        opacity: 1;
        filter: brightness(1.5) blur(2px);
    }
    50% {
        opacity: 0.8;
        filter: brightness(1.3) blur(3px);
    }
    100% {
        transform: translate(-50%, -50%) scale(4, 1.6);
        opacity: 0;
        filter: brightness(1.2) blur(4px);
    }
}

@keyframes floatUp {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
        opacity: 1;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translate3d(var(--x-end), var(--y-end), 0) rotate(var(--rotation)) scale(0);
        opacity: 0;
    }
}

@keyframes borderTrace {
    0% {
        background-position: 200% 0%;
    }
    100% {
        background-position: 0% 0%;
    }
}

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

@keyframes jitter {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(-0.5px, 0.5px) rotate(-0.5deg);
    }
    50% {
        transform: translate(0.5px, -0.5px) rotate(0.5deg);
    }
    75% {
        transform: translate(-0.5px, -0.5px) rotate(0deg);
    }
    100% {
        transform: translate(0.5px, 0.5px) rotate(-0.5deg);
    }
}

@keyframes shadowPulse {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(1.2);
    }
}

/* 5. Components - Specific Component Styles */
/* No changes needed here as components are already well-structured */

/* 6. Trumps - Overrides */
/* No changes needed here as overrides are minimal and well-placed */

/* 7. Utilities - Generic Helper Classes */
.version-display {
    position: absolute;
    top: 3px;
    right: 3px;
    font-size: 8.9px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(13, 17, 23, 0.85);
    color: rgba(243, 236, 204, 0.6);
    z-index: 500;
    font-family: monospace;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(64, 224, 208, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    user-select: none;
    -webkit-user-select: none;
    /* pointer-events: none; */
}

.drop-zone {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 17, 23, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9999;
}

.drop-zone.drag-over {
    opacity: 1;
    pointer-events: auto;
}

.drop-zone p {
    color: var(--text-color);
    font-size: 24px;
    margin-bottom: 16px;
}

.drop-zone button {
    background-color: var(--user-accent);
    color: var(--primary-dark);
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
    #main-container {
        position: fixed;
        top: 0;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: min(90%, 800px);
        height: 100vh !important;
        overflow: hidden;
    }
}

.pwa-mode .container {
    margin-bottom: 0;
}

.pwa-mode .footer-space {
    height: 0;
}

.ios-device:not(.pwa-mode) .particle-container {
    position: absolute;
    transform-style: preserve-3d;
}

.ios-device:not(.pwa-mode) .particle {
    transform-style: preserve-3d;
}

.send-button-container {
    flex-shrink: 0;
    display: flex;
    position: absolute;
    right: 0%;
    bottom: 0%;
    z-index: 2;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
    /* padding-right: calc(var(--vw) * 1); */
}

.upload-preview {
    position: absolute;
    left: 0;
    right: 60px; /* Space for send button */
    bottom: calc(100% + 8px);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    margin-bottom: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    background: rgba(22, 27, 34, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(64, 224, 208, 0.2);
    transition: all 0.3s ease;
    z-index: 3;
    height: auto;
    min-height: 74px;
    max-height: 74px;
}

.upload-preview::-webkit-scrollbar {
    display: none;
}

.preview-item {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    scroll-snap-align: start;
    border-radius: 8px;
    overflow: hidden;
    background: var(--primary-darker);
    border: 1px solid var(--accent-gold);
    transition: all 0.2s ease;
    cursor: pointer;
}

.preview-content {
    width: 100%;
    height: 100%;
    /* display: flex;
    align-items: center; */
    /* justify-content: center; */
    position: relative;
    overflow: hidden
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.preview-item:hover .preview-image {
    transform: scale(1.1);
}

.preview-size {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 10px;
    padding: 2px 4px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    color: var(--text-color);
}

.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(13, 17, 23, 0.85);
    color: var(--text-color);
    border: 1px solid var(--accent-gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
    z-index: 2;
}

.preview-remove:hover {
    background: var(--accent-gold);
    color: var(--primary-dark);
    transform: scale(1.1) !important;
}

body:not(.ios-device) .preview-item:hover .preview-remove {
    opacity: 1;
    transform: scale(1);
}

.ios-device .preview-item:active .preview-remove {
    opacity: 1;
    transform: scale(1);
}

/* Show preview container only when it has content */
.upload-preview:empty {
    display: none;
}

/* Adjust textarea padding when previews are present */
.upload-preview:not(:empty) + textarea {
    padding-top: 8px;
}

/* Hide the native file input but keep it accessible */
#fileInput {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Add desktop-specific adjustments */
@media (hover: hover) and (pointer: fine) {
    /* Ensure these styles don't apply to iOS devices */
    body:not(.ios-device) .input-wrapper {
        padding-top: 0;
        margin-top: 8px;
    }

    body:not(.ios-device) .upload-preview {
        position: relative;
        bottom: auto;
        top: auto;
        margin: 0 0 8px 0;
        background: rgba(22, 27, 34, 0.4);
        border-radius: 10px;
        min-height: 64px;
        max-height: 64px;
        border-color: rgba(64, 224, 208, 0.15);
        backdrop-filter: blur(8px);
    }

    body:not(.ios-device) .preview-item {
        width: 56px;
        height: 56px;
        border-radius: 8px;
        transform-origin: center;
        transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    body:not(.ios-device) .preview-item:hover {
        transform: translateY(-2px) scale(1.02);
    }

    body:not(.ios-device) .upload-preview:not(:empty) + textarea {
        padding-top: 12px;
        border-color: rgba(64, 224, 208, 0.4);
    }
}

/* Preserve critical iOS styling */
.ios-device .upload-preview {
    position: absolute !important; /* Force override */
    bottom: calc(100% + env(safe-area-inset-bottom)) !important;
    margin-bottom: 0;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    min-height: 74px;
    max-height: 74px;
}

/* Update the iOS-specific styles */
@supports (-webkit-touch-callout: none) {
    /* Common iOS styles */
    html.ios-device,
    .ios-device body,
    .ios-device #main-container {
        position: fixed;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        overflow: hidden;
        height: var(--window-inner-height);
        width: 100%;
        overscroll-behavior: none;
        -webkit-overflow-scrolling: none;
    }

    /* Specific styles for input container */
    .ios-device .input-container,
    .ios-device.pwa-mode .input-container {
        position: fixed !important;
        bottom: 0;
        left: 0;
        width: 100%;
        padding-bottom: max(calc(var(--vh) * 1.5), env(safe-area-inset-bottom));
        z-index: 1000;
        background: var(--primary-dark);
        padding: calc(var(--vh) * 1.5) calc(var(--vw) * 2);
        transform: translateZ(0);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    /* Adjust main container for iOS */
    .ios-device #main-container {
        display: flex;
        flex-direction: column;
        height: 100% !important;
        padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) 0;
        transform: none !important;
        margin: 0 !important;
        padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
        overflow: hidden;
        -webkit-overflow-scrolling: touch;
    }

    /* Chat container adjustments */
    .ios-device .chat-container {
        position: relative;
        flex: 1;
        padding-bottom: calc(var(--input-container-height) + env(safe-area-inset-bottom) + 10px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0;
        contain: content;
        transform: translateZ(0);
    }

    /* Focused input container */
    .input-container.focused {
        padding-bottom: max(env(safe-area-inset-bottom), 20px);
    }

    /* Container adjustments */
    .container {
        min-height: -webkit-fill-available;
    }
}

.ios-device .upload-preview {
    bottom: calc(100% + env(safe-area-inset-bottom));
    margin-bottom: 0;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}

/* Update PWA mode styles */
.ios-device.pwa-mode #main-container {
    padding-bottom: env(safe-area-inset-bottom) !important;
}

.ios-device.pwa-mode .input-container {
    padding-bottom: max(calc(var(--vh) * 1.5), env(safe-area-inset-bottom)) !important;
    margin-bottom: 5px;
}

/* Non-iOS device styles */
:not(.ios-device) #main-container {
    height: 100% !important;
}

:not(.ios-device) .input-container {
    bottom: 0 !important;
    padding-bottom: calc(var(--vh) * 1.5);
}

/* Update preview items styling */
.preview-item {
    position: relative;
    width: 74px;
    height: 74px;
    border-radius: 12px;
    overflow: visible;
    background: var(--primary-darker);
    border: 1px solid var(--accent-gold);
    transition: all 0.2s ease;
}

.preview-content {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.preview-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(13, 17, 23, 0.95);
    color: var(--text-color);
    border: 1px solid var(--accent-gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: all 0.2s ease;
    transform: scale(0.8);
    z-index: 10;
}

/* Add image preview in chat styling */
.message-image-preview {
    max-width: 200px;
    max-height: 150px;
    border-radius: 6px;
    cursor: zoom-in;
    transition: all 0.2s ease;
    margin: 8px 0 4px 0;
    display: block;
    object-fit: cover;
    background: rgba(13, 17, 23, 0.5);
}

.message-image-preview:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(64, 224, 208, 0.2);
}

/* Image viewer modal */
.image-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    visibility: hidden;
    pointer-events: none;
}

.image-viewer-overlay.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear;
    pointer-events: auto;
}

.image-viewer-content {
    position: relative;
    max-width: 95%;
    max-height: 95vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    background: var(--secondary-dark);
    border: 1px solid var(--accent-gold);
}

.image-viewer-overlay.visible .image-viewer-content {
    transform: scale(1);
}

.image-viewer-image {
    max-width: 100%;
    max-height: 95vh;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.image-viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(13, 17, 23, 0.8);
    border: 1px solid var(--accent-gold);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.image-viewer-close:hover {
    background: rgba(64, 224, 208, 0.2);
    transform: scale(1.1);
}

/* Add new image preview styling */
.message-image-container {
    margin: 8px -5px -5px -5px; /* Negative margins to blend with message bubble */
    border-radius: 0 0 10px 10px; /* Round bottom corners to match bubble */
    overflow: hidden;
    cursor: zoom-in;
    transition: all 0.2s ease;
    position: relative;
}

.message-image-preview {
    max-width: 100%;
    max-height: 300px; /* Increased from 150px */
    display: block;
    object-fit: contain;
    background: rgba(13, 17, 23, 0.5);
}

.message-image-preview:hover {
    filter: brightness(1.1);
}

/* Add zoom indicator */
.message-image-container::after {
    content: '🔍';
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(13, 17, 23, 0.7);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.message-image-container:hover::after {
    opacity: 1;
}


/* Update attachment button styling */
.tool-button.attachment-button {
    position: relative;
    z-index: 1001;
    width: 36px;
    height: 36px;
    padding: 8px;
    background: rgba(64, 224, 208, 0.1);
    border: 1px solid rgba(64, 224, 208, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.tool-button.attachment-button.active {
    background: rgba(64, 224, 208, 0.2);
    border-color: rgba(64, 224, 208, 0.4);
}

.attachment-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: rgba(22, 27, 34, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(64, 224, 208, 0.2);
    border-radius: 12px;
    padding: 6px;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    visibility: hidden;
    z-index: 1000;
}

.attachment-menu.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
}

.attachment-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--text-color);
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    background: transparent;
}

.attachment-menu-item:hover {
    background: rgba(64, 224, 208, 0.1);
}

.attachment-menu-item svg {
    stroke: var(--user-accent);
    transition: all 0.2s ease;
}

.attachment-menu-item:hover svg {
    stroke: var(--accent-gold);
}

.attachment-menu-item span {
    user-select: none;
}

/* Update button and menu styling to match Microsoft's design */
.plus-button {
    position: absolute;
    left: 1%;
    bottom: 9%;
    width: 28px;
    height: 28px;
    z-index: 3;
    background: rgba(64, 224, 208, 0.1);
    border: 1px solid rgba(64, 224, 208, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.plus-button svg {
    width: 18px;
    height: 18px;
    stroke: var(--user-accent);
    transition: all 0.2s ease;
    stroke-width: 2.2;
}

button.plus-button:hover {
    background: rgba(64, 224, 208, 0.12);
    border-color: rgba(64, 224, 208, 0.25);
    transform: none;
}

.plus-button.active {
    background: rgba(64, 224, 208, 0.15);
    border-color: rgba(64, 224, 208, 0.3);
}

.plus-button:hover svg,
.plus-button.active svg {
    stroke: var(--accent-gold);
}

.action-menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    background: rgba(13, 17, 23, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(64, 224, 208, 0.15);
    border-radius: 8px;
    padding: 6px;
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3),
                0 2px 8px rgba(0, 0, 0, 0.2);
    visibility: hidden;
    z-index: 1000;
}

.action-menu.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
}

.action-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    color: var(--text-color);
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin: 1px;
}

.action-menu-item:hover {
    background: rgba(64, 224, 208, 0.08);
}

.action-menu-item svg {
    width: 16px;
    height: 16px;
    stroke: var(--user-accent);
    stroke-width: 2;
    transition: all 0.2s ease;
}

.action-menu-item:hover svg {
    stroke: var(--accent-gold);
    transform: scale(1.1);
}

.action-menu-item span {
    user-select: none;
    font-weight: 500;
    letter-spacing: 0.2px;
}


.keyboard-shortcut {
    color: var(--text-muted);
    font-size: 0.85em;
    padding: 3px 6px;
    background: var(--primary-darker);
    border-radius: 4px;
    margin-left: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    /* border: 0px solid var(--accent-gold); */
    box-shadow: 0 1px 2px rgba(255, 215, 0, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.keyboard-shortcut span {
    border: 1px solid var(--accent-gold);
    padding: 1px 4px;
    border-radius: 3px;
    min-width: 14px;
    text-align: center;
    background: rgba(13, 17, 23, 0.95);
}

.keyboard-shortcut span + span {
    margin-left: -1px;
}

@media (hover: none) and (pointer: coarse) {
    /* iOS-specific styles */
    textarea {
        padding: 12px 16px; /* Adjust padding for iOS */
    }
}

.textarea-container {
    position: relative;
    display: flex;
    width: 100%;
    min-width: 0;
}

textarea {
    width: 100%;
    padding: 12px 52px;
    min-width: 0;
    background: rgba(22, 27, 34, 0.7);
    border: 1px solid rgba(64, 224, 208, 0.3);
    border-radius: 16px;
    color: var(--text-color);
    font-size: 15px;
    line-height: 1.5;
    resize: none;
    height: 44px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}


/* Media queries for responsive design */
@media (min-width: 769px) and (max-width: 1024px) {
    #main-container {
        width: min(95%, 800px);
    }
}

@media (min-width: 1025px) {
    #main-container {
        width: min(90%, 800px);
    }
}

@media (min-width: 769px) {
    #main-container {
        height: 100vh;
        padding-bottom: 0;
    }
    
    .chat-container {
        height: calc(100vh - var(--title-height) - var(--input-container-height));
        margin-bottom: 0;
        padding-bottom: var(--padding-base);
    }
    
    .input-container {
        position: relative;
        bottom: 0;
        margin-top: auto;
        background: linear-gradient(to bottom, rgba(13, 17, 23, 0.85) 0%, rgba(13, 17, 23, 0.95) 100%);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

@media (max-width: 768px) {
    .input-wrapper {
        width: 95%;
    }
}

/* PWA specific adjustments */
.pwa-mode .input-container {
    padding-bottom: max(calc(var(--vh) * 1.5), env(safe-area-inset-bottom));
}

.pwa-mode .input-wrapper {
    width: 95%;
}

/* Adjust textarea padding to account for plus button */
textarea {
    padding-left: 48px;
}

/* File Drop Overlay */
.file-drop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 17, 23, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.file-drop-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.drop-overlay-content {
    text-align: center;
    color: var(--text-color);
    padding: 2rem;
    border: 3px dashed var(--accent-gold);
    border-radius: 1rem;
    background: rgba(13, 17, 23, 0.8);
    max-width: 80%;
}

.drop-overlay-content .drop-icon {
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.drop-overlay-content h2 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    color: var(--accent-gold);
}

.drop-overlay-content p {
    margin: 0;
    opacity: 0.8;
}

.drop-icon {
    margin-bottom: 1rem;
}

.drop-icon svg {
    stroke: var(--accent-gold);
    opacity: 0.8;
}

/* Add styles for dragging state */
html.dragging {
    cursor: copy;
}

html.dragging * {
    pointer-events: none;
}

html.dragging .file-drop-overlay {
    pointer-events: all;
}

/* Blur effect for background when overlay is active */
.blur-background {
    filter: blur(4px);
    transition: filter 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* File Upload Preview */
.file-preview {
    display: flex;
    align-items: center;
    background: rgba(22, 27, 34, 0.8);
    border-radius: 8px;
    padding: 0.5rem;
    margin: 0.5rem 0;
    max-width: 300px;
}

.file-preview img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 0.5rem;
}

.file-preview-info {
    flex: 1;
    overflow: hidden;
}

.file-preview-name {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-size {
    font-size: 0.8rem;
    opacity: 0.7;
}

.file-preview-remove {
    background: none;
    border: none;
    color: var(--error-accent);
    cursor: pointer;
    padding: 4px;
    margin-left: 0.5rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.file-preview-remove:hover {
    opacity: 1;
}

/* System Update Message Styling */
.system-update-message {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px;
    background: rgba(13, 17, 23, 0.3);
    border-radius: 8px;
}

.update-header {
    font-size: 1.1em;
    color: var(--accent-gold);
    font-weight: 500;
}

.update-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 12px;
    border-left: 2px solid rgba(212, 175, 55, 0.3);
}

.update-changes {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 12px;
    border-left: 2px solid rgba(212, 175, 55, 0.3);
}

.change-item {
    padding-left: 8px;
    position: relative;
}

.update-prompt {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    padding: 8px;
    background: rgba(13, 17, 23, 0.4);
    border-radius: 6px;
}

.dimension-door {
    position: relative;
    width: 32px;
    height: 32px;
    margin-right: 8px;
}

.door-frame {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-gold);
    border-radius: 4px;
    overflow: hidden;
}

.door {
    position: absolute;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-gold) 0%, rgba(212, 175, 55, 0.6) 100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.door.left {
    left: 0;
    transform-origin: left;
}

.door.right {
    right: 0;
    transform-origin: right;
}

.light-rays {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--accent-gold) 0%, transparent 70%);
    opacity: 0.3;
    pointer-events: none;
}

.deployment-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.update-button {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.update-button:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: translateY(-1px);
}

.update-button:active {
    transform: translateY(1px);
}

.deployment-message {
    animation: fadeIn 0.3s ease-out;
    margin: 16px 0;
}

/* Face ID Button */
.face-id-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--accent-gold);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 24px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.face-id-button:hover {
    background: var(--accent-gold-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.face-id-icon {
    font-size: 24px;
    color: var(--text-color);
}

.face-id-text {
    font-size: 16px;
    color: var(--text-color);
}

/* Face ID Prompt */
.face-id-prompt {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.prompt-container {
    background: var(--secondary-dark);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--accent-gold);
    width: 80%;
    max-width: 300px;
    text-align: center;
}

.prompt-container h3 {
    color: var(--accent-gold);
    margin: 0 0 15px 0;
}

.prompt-container p {
    margin: 0 0 20px 0;
    line-height: 1.4;
}

.prompt-status {
    min-height: 20px;
    margin: 10px 0;
    padding: 8px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.prompt-status:empty {
    display: none;
}

.prompt-status.error {
    background: rgba(220, 20, 60, 0.1);
    border: 1px solid var(--error-accent);
    color: var(--error-accent);
}

.prompt-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.prompt-button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    min-width: 100px;
    transition: all 0.2s ease;
}

.prompt-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.prompt-button.enable {
    background: var(--accent-gold);
    color: var(--primary-dark);
}

.prompt-button.enable:disabled {
    background: var(--accent-gold);
    opacity: 0.5;
}

.prompt-button.skip {
    background: transparent;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
}

.prompt-button.skip:disabled {
    border-color: var(--accent-gold);
    opacity: 0.5;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}
