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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    height: 100vh;
    height: 100dvh; /* Use dynamic viewport height on supported browsers */
    color: #f8fafc;
    margin: 0;
    padding: 0;
    position: relative;
}

/* Ocean Background */
.ocean-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Use dynamic viewport height on supported browsers */
    z-index: -10;
}

.ocean-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #7dd3fc 0%, #0284c7 30%, #1e3a8a 70%, #0f172a 100%);
}

.noise-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    mix-blend-mode: overlay;
    background-image: radial-gradient(transparent 0, rgba(0,0,0,0.3) 100%);
}

.light-rays {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.light-ray {
    position: absolute;
    top: -10%;
    height: 140%;
    width: 30%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.05) 50%, transparent 100%);
    filter: blur(3rem);
    transform: rotate(-10deg);
    animation: lightRayFloat 6s ease-in-out infinite;
}

.light-ray:nth-child(2) { animation-delay: 0.4s; animation-duration: 7s; }
.light-ray:nth-child(3) { animation-delay: 0.8s; animation-duration: 6.5s; }
.light-ray:nth-child(4) { animation-delay: 1.2s; animation-duration: 7.5s; }
.light-ray:nth-child(5) { animation-delay: 1.6s; animation-duration: 6.8s; }
.light-ray:nth-child(6) { animation-delay: 2s; animation-duration: 7.2s; }

@keyframes lightRayFloat {
    0%, 100% { opacity: 0.12; transform: rotate(-10deg) translateY(0); }
    50% { opacity: 0.22; transform: rotate(-10deg) translateY(20px); }
}

.sea-floor {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.4) 50%, transparent 100%);
}

/* Parallax Plants */
.plants-parallax {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* Full-screen aquarium */
#aquariumCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Use dynamic viewport height on supported browsers */
    z-index: 1;
}

/* Bubble Container */
.bubble-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Modern Header */
.modern-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    animation: headerSlideIn 0.6s ease-out;
}

.header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: #2dd4bf;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-size: 1.2rem;
}

.brand-title {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.7);
}

.brand-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8), 0 0 6px rgba(0, 0, 0, 0.6);
}

.header-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.status-icon {
    font-size: 1rem;
}

.status-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

@keyframes headerSlideIn {
    from {
        transform: translateY(-12px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Persistent Toggle Button */
.drawing-toggle-btn {
    position: fixed;
    right: var(--toggle-btn-right, 1rem);
    top: var(--toggle-btn-top, 7rem);
    z-index: 150;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(16px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.drawing-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.drawing-toggle-btn.panel-open {
    background: rgba(45, 212, 191, 0.3);
    border-color: rgba(45, 212, 191, 0.5);
}

/* Glassmorphism Control Panel */
.glass-control-panel {
    position: fixed;
    right: var(--panel-right, 4.5rem); /* Default matches common desktop calculation: 72px = 4.5rem */
    top: var(--panel-top, 7rem); /* Reduced from 11rem to better match button alignment */
    z-index: 100; /* Much higher to ensure it's above canvas */
    width: var(--panel-width, 22.5rem); /* Default matches common desktop calculation: 360px = 22.5rem */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(16px);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
    padding: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: panelSlideIn 0.7s ease-out;
    scroll-behavior: smooth;
}

.glass-control-panel.hidden {
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.title-icon {
    font-size: 1.25rem;
}

.panel-title h2 {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}


.panel-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.control-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.7);
}

.name-generator-btn {
    background: rgba(45, 212, 191, 0.1);
    border: 1px solid rgba(45, 212, 191, 0.3);
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: 0.85rem !important; /* Increased from 0.75rem - !important to override .control-label */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(45, 212, 191, 0.8);
    min-width: fit-content;
    font-weight: 600;
}

.name-generator-btn:hover {
    background: rgba(45, 212, 191, 0.2);
    border-color: rgba(45, 212, 191, 0.5);
    color: rgba(45, 212, 191, 1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(45, 212, 191, 0.2);
}

.control-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: flex-end;
}

.modern-range {
    width: 100%;
    accent-color: #2dd4bf;
}

.size-value {
    min-width: 2.5rem;
    text-align: right;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Layer Tabs */
.layer-tabs {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    padding: 0.25rem;
}

.layer-tab {
    flex: 1;
    padding: 0.375rem 0.75rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.layer-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.layer-tab.active {
    background: rgba(45, 212, 191, 0.2);
    color: #2dd4bf;
    box-shadow: 0 2px 8px rgba(45, 212, 191, 0.3);
}

/* Color Swatches */
.color-swatches {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-swatch {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.color-swatch:hover {
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.color-swatch.active {
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}


/* Fish Name Input */
.fish-name-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem; /* Reduced height padding */
    color: white;
    font-size: 14px !important; /* Reduced from 16px for better consistency with button */
    font-weight: 500;
    width: 90%; /* Slightly shorter than original 100% width */
    max-width: 90%; /* Ensure it doesn't expand beyond container */
    transition: all 0.2s ease;
    text-align: center;
    text-transform: uppercase;
    line-height: 1.2; /* Tighter line height for less height */
}

.fish-name-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    font-size: 13px !important; /* Smaller placeholder text */
}

/* Vendor prefixes for better browser support */
.fish-name-input::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    font-size: 13px !important;
}

.fish-name-input::-moz-placeholder {
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    font-size: 13px !important;
}

.fish-name-input:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    font-size: 13px !important;
}

.fish-name-input:focus {
    outline: none;
    border-color: rgba(45, 212, 191, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.2);
    /* Keep consistent font size on focus */
    font-size: 14px !important;
    transform: none;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Changed from space-between to prevent overflow */
    gap: 0.375rem; /* Reduced gap */
    flex-wrap: wrap; /* Allow wrapping if needed */
}

/* Compact button variants for action buttons */
.action-buttons .btn-soft,
.action-buttons .btn-primary {
    padding: 0.375rem 0.75rem; /* Smaller padding */
    font-size: 0.75rem; /* Smaller text */
    gap: 0.375rem; /* Smaller gap between icon and text */
    min-height: auto; /* Remove minimum height */
}

.action-buttons .btn-icon {
    font-size: 0.875rem; /* Smaller icons */
}

.btn-soft {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-soft:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    background: linear-gradient(135deg, #2dd4bf 0%, #2563eb 100%);
    color: #0f172a;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px) scale(1.02);
}

.btn-primary:disabled,
.btn-primary.btn-cooldown {
    opacity: 0.6;
    cursor: not-allowed;
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    transform: none;
    filter: none;
}

.btn-primary:disabled:hover,
.btn-primary.btn-cooldown:hover {
    filter: none;
    transform: none;
}

/* Cooldown overlay styles */
.btn-primary,
.btn-soft {
    position: relative;
    overflow: hidden;
}

.cooldown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    border-radius: 9999px;
    z-index: 1;
}

.btn-icon {
    font-size: 1rem;
}

/* Canvas Container */
.canvas-container {
    margin-top: 1rem;
    border-radius: 1rem;
    overflow: visible; /* Allow canvas to use full width */
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: white;
}

#drawingCanvas {
    display: block;
    width: 100%;
    cursor: crosshair;
}

@keyframes panelSlideIn {
    from {
        transform: translate(24px, -24px);
        opacity: 0;
    }
    to {
        transform: translate(0, 0);
        opacity: 1;
    }
}

/* Modern Status Bar - HIDDEN */
.modern-status-bar {
    display: none !important; /* Completely remove the redundant status bar */
}

/* Minimal Floating Fish Indicator */
.fish-indicator {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    z-index: 25;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    border-radius: 1rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.fish-indicator .fish-emoji {
    font-size: 0.875rem;
}

.fish-clear-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fish-clear-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.fish-clear-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.admin-indicator {
    font-size: 0.75rem;
    opacity: 0.8;
}

.modern-status-bar > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.65rem; /* Much smaller text */
    min-height: 1.25rem; /* Compact height */
}

.status-left {
    display: flex;
    align-items: center;
    gap: 0.375rem; /* Much tighter spacing */
}

.status-left .status-icon {
    font-size: 0.75rem; /* Smaller icon */
}

.status-right {
    display: flex;
    align-items: center;
    gap: 0.25rem; /* Much tighter spacing */
}

.status-divider {
    width: 1px;
    height: 1rem;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 0.5rem;
}

.btn-soft-small {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.125rem; /* Tighter gap */
    padding: 0.125rem 0.375rem; /* Much smaller padding */
    border-radius: 0.375rem; /* Smaller border radius */
    font-size: 0.6rem; /* Much smaller text */
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    min-height: 1rem; /* Compact height */
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-soft-small:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px) scale(1.02);
}

@keyframes statusBarSlideIn {
    from {
        transform: translateX(-50%) translateY(24px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Bubble animations */
.bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    animation: bubbleFloat 8s linear infinite;
}

@keyframes bubbleFloat {
    0% {
        transform: translateY(0) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.2;
    }
    100% {
        transform: translateY(-800px) scale(1.1);
        opacity: 0;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .drawing-toggle-btn {
        right: var(--toggle-btn-right-mobile, 1rem);
        top: var(--toggle-btn-top-mobile, 6.5rem);
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
    
    .glass-control-panel {
        right: var(--panel-right-mobile, 1rem);
        left: auto; /* Don't stretch to left */
        top: var(--panel-top-mobile, 9rem);
        width: var(--panel-width-mobile, 300px); /* Increased from 280px to 300px for mobile */
        max-width: calc(100vw - 2rem); /* Don't exceed screen */
        height: auto;
        max-height: 60vh; /* Reduced height - much less content now */
        overflow-y: auto;
        overflow-x: hidden;
        padding: 0.375rem; /* More compact padding */
    }
    
    /* Mobile fish indicator */
    .fish-indicator {
        bottom: 0.5rem;
        left: 0.5rem;
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
        gap: 0.375rem;
    }
    
    .fish-clear-btn {
        padding: 0.125rem 0.375rem;
        font-size: 0.6rem;
    }
    
    .modern-header {
        padding: 0.75rem 1rem;
    }
    
    .header-brand {
        padding: 0.375rem 0.75rem;
        transform: scale(0.6); /* Shrink to 60% size */
        transform-origin: left center; /* Scale from left to avoid layout shift */
    }
    
    .header-audio-controls {
        transform: scale(0.7); /* Smaller size for mobile */
        transform-origin: right center; /* Scale from right to avoid layout shift */
    }
    
    .brand-title {
        font-size: 0.8rem;
    }
    
    .brand-subtitle {
        font-size: 0.7rem;
    }
    
    
    .control-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem; /* Tighter spacing */
        margin-bottom: 0.5rem;
    }
    
    .control-label {
        font-size: 0.65rem; /* Smaller labels */
        margin-bottom: 0.125rem;
    }
    
    .name-generator-btn {
        padding: 0.2rem 0.4rem; /* Maintain button padding on mobile */
        font-size: 0.7rem !important; /* Override .control-label mobile size */
        width: 100%; /* Make button full width to match input on mobile */
        min-width: unset;
        box-sizing: border-box;
    }
    
    .fish-name-input {
        width: 100%; /* Full width on mobile */
        max-width: 100%; /* Override desktop max-width */
        box-sizing: border-box;
        font-size: 13px !important; /* Maintain smaller size on mobile */
    }
    
    .control-input {
        justify-content: stretch;
        width: 100%;
    }
    
    
    .action-buttons {
        flex-direction: row; /* Keep buttons in a row on mobile */
        gap: 0.25rem; /* Tighter spacing for mobile row */
        justify-content: space-between;
    }
    
    .action-buttons .btn-soft,
    .action-buttons .btn-primary {
        padding: 0.25rem 0.25rem; /* Ultra-compact for mobile row */
        font-size: 0.585rem; /* 10% smaller: 0.65 * 0.9 = 0.585 */
        min-height: auto;
        flex: 1; /* Make buttons equal width */
        text-align: center;
        white-space: nowrap; /* Prevent text wrapping */
        min-width: 0; /* Allow buttons to shrink if needed */
    }
    
    .action-buttons .btn-icon {
        font-size: 0.675rem; /* 10% smaller: 0.75 * 0.9 = 0.675 */
    }
    
    .canvas-container {
        margin: 0.5rem 0; /* Reduced margin */
        border-radius: 0.75rem;
        order: -1; /* Move canvas to top on mobile */
    }
    
    #drawingCanvas {
        height: auto;
        width: 100%; /* Fill container width */
        max-width: none; /* Remove width restriction */
    }
    
    .panel-content {
        gap: 0.375rem; /* More compact spacing with fewer elements */
        display: flex;
        flex-direction: column;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .glass-control-panel {
        top: 5rem;
        width: 285px; /* Increased from 270px - wide enough for colors in one row even on small screens */
        max-width: calc(100vw - 1rem);
        max-height: 55vh; /* Even more compact for small screens */
        padding: 0.25rem; /* Ultra-compact padding */
    }
    
    /* Extra small mobile fish indicator */
    .fish-indicator {
        bottom: 0.25rem;
        left: 0.25rem;
        padding: 0.125rem 0.375rem;
        font-size: 0.65rem;
        gap: 0.25rem;
    }
    
    .fish-clear-btn {
        padding: 0.0625rem 0.25rem;
        font-size: 0.55rem;
    }
    
    .drawing-toggle-btn {
        top: 4.5rem;
        width: 2.25rem;
        height: 2.25rem;
    }
    
    #drawingCanvas {
        height: auto;
        width: 100%;
        max-width: none; /* Remove width restriction for small screens too */
    }
    
    .canvas-container {
        margin: 0.5rem 0;
        order: -1; /* Canvas at top */
    }
    
    .panel-content {
        gap: 0.25rem; /* Ultra-tight spacing for small screens */
    }
    
    .color-swatches {
        justify-content: center;
        flex-wrap: nowrap; /* Keep all colors in one row */
        gap: 0.375rem;
    }
    
    .color-swatch {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .layer-tabs {
        gap: 0.125rem;
        padding: 0.125rem;
    }
    
    .layer-tab {
        padding: 0.25rem 0.375rem;
        font-size: 0.65rem;
    }
    
}

/* Legacy CSS classes removed - no longer needed */

#brushSizeValue::after {
    content: '';
}

/* Header Audio Controls */
.header-audio-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.header-audio-controls:hover {
    background: rgba(255, 255, 255, 0.15);
}

.header-audio-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #f8fafc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.header-audio-btn:hover {
    background: rgba(34, 197, 94, 0.3);
    transform: scale(1.05);
}

.header-audio-btn.playing {
    background: rgba(34, 197, 94, 0.5);
    animation: pulse 2s infinite;
}

.header-audio-btn.playing .audio-icon {
    animation: float 3s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

.header-audio-slider {
    width: 60px;
    height: 3px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.header-audio-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #22c55e, #10b981);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.header-audio-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 1px 4px rgba(34, 197, 94, 0.4);
}

.header-audio-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #22c55e, #10b981);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.header-audio-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 1px 4px rgba(34, 197, 94, 0.4);
}

.header-volume-display {
    font-size: 10px;
    color: rgba(248, 250, 252, 0.8);
    min-width: 25px;
    text-align: right;
    font-weight: 500;
}

/* Mobile adjustments for header audio controls */
@media (max-width: 768px) {
    .header-audio-controls {
        gap: 6px;
        padding: 3px 6px;
    }
    
    .header-audio-btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .header-audio-slider {
        width: 50px;
    }
    
    .header-volume-display {
        font-size: 9px;
        min-width: 20px;
    }
}

/* GoldenCZ Banner Attribution - positioned within header */
.goldencz-banner {
    display: flex;
    justify-content: flex-end;
    pointer-events: none; /* Don't interfere with aquarium interaction */
    padding-right: 0; /* Align with audio controls on the right */
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    font-size: 0.6rem; /* Reduced by 20% from 0.75rem */
}

.banner-text {
    font-size: inherit;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.led-icon {
    font-size: 0.56rem; /* Reduced by 20% from 0.7rem */
    animation: ledGlow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.6));
}

@keyframes ledGlow {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
        filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.8));
    }
}

/* Mobile adjustments for top banner */
@media (max-width: 768px) {
    .modern-header {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }
    
    .header-brand {
        padding: 0.375rem 0.75rem;
        transform: scale(0.85);
        transform-origin: left center;
    }
    
    .goldencz-banner {
        justify-content: flex-end;
        padding-right: 0;
    }
    
    .banner-content {
        padding: 3px 6px;
        gap: 3px;
        font-size: 0.52rem; /* Reduced by 20% from 0.65rem */
    }
    
    .led-icon {
        font-size: 0.4rem; /* Reduced by 20% from 0.5rem */
    }
}

@media (max-width: 480px) {
    .modern-header {
        padding: 0.5rem 0.75rem;
        gap: 0.375rem;
    }
    
    .header-brand {
        transform: scale(0.75);
    }
    
    .banner-content {
        padding: 2px 5px;
        gap: 2px;
        font-size: 0.48rem; /* Reduced by 20% from 0.6rem */
    }
    
    .led-icon {
        font-size: 0.36rem; /* Reduced by 20% from 0.45rem */
    }
}

@media (max-width: 375px) {
    .modern-header {
        padding: 0.375rem 0.5rem;
        gap: 0.25rem;
    }
    
    .header-brand {
        transform: scale(0.65);
    }
    
    .banner-content {
        font-size: 0.44rem; /* Reduced by 20% from 0.55rem */
    }
    
    .led-icon {
        font-size: 0.32rem; /* Reduced by 20% from 0.4rem */
    }
}

/* GoldenCZ LED Strip Around Banner */
.goldencz-banner-led {
    position: relative;
}

.goldencz-banner-led::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    pointer-events: none;
    z-index: -1;
    border-radius: inherit;
    
    /* Create animated LED strip border */
    border: 2px solid transparent;
    background: linear-gradient(90deg, 
        #ff0000, #ff4500, #ff8c00, #ffd700, 
        #00ff00, #00ffff, #0080ff, #4b0082, 
        #8b00ff, #ff00ff, #ff0000) border-box;
    background-size: 200% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: ledBorderFlow 3s linear infinite;
    filter: brightness(1.3) saturate(1.2);
}

.goldencz-banner-led::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    pointer-events: none;
    z-index: -2;
    border-radius: inherit;
    background: radial-gradient(ellipse at center, 
        rgba(255, 255, 255, 0.2) 0%, 
        transparent 70%);
    animation: ledPulseGlow 2s ease-in-out infinite;
}

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

@keyframes ledPulseGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.02);
    }
}

/* Enhanced hover effect */
.goldencz-banner-led:hover::before {
    animation-duration: 1.5s;
    filter: brightness(1.5) saturate(1.4);
}

/* Mobile adjustments for banner LED */
@media (max-width: 768px) {
    .goldencz-banner-led::before {
        border-width: 1.5px;
        filter: brightness(1.2) saturate(1.1);
    }
}

@media (max-width: 480px) {
    .goldencz-banner-led::before {
        border-width: 1px;
        top: -1px;
        left: -1px;
        right: -1px;
        bottom: -1px;
        filter: brightness(1.1) saturate(1);
    }
    
    .goldencz-banner-led::after {
        display: none; /* Remove glow on very small screens to reduce visual clutter */
    }
}


