/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow: hidden;
    height: 100%;
    width: 100%;
}

:root {
    --primary-color: #0078D4;
    --primary-dark: #005A9E;
    --secondary-color: #28A745;
    --danger-color: #DC3545;
    --background: #F5F5F5;
    --surface: #FFFFFF;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #D0D0D0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --header-height: 56px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100%;
    margin: 0;
    padding: 0;
}

/* App Container */
.app {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    flex-shrink: 0; /* Prevent header from shrinking */
}

.app-header h1 {
    font-size: 21px;
    font-weight: 900;
    flex: 1;
    text-align: center;
}

.menu-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.menu-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

.menu-btn.active {
    background: rgba(255, 255, 255, 0.2);
}

.help-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
    font-size: 22px;
}

.help-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

/* Controls Panel */
.controls-panel {
    position: fixed;
    top: var(--header-height);
    left: -90%;
    width: 90%;
    height: calc(100vh - var(--header-height));
    background: var(--surface);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
    overflow-y: hidden;
    transition: left 0.3s ease-out;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

.controls-panel.open {
    left: 0;
}

/* Overlay when menu is open */
.menu-overlay {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
    z-index: 1500;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.control-section {
    padding: 20px 16px;
}

.control-section:first-child {
    padding-top: 0;
    padding-bottom: 30px;
    flex-shrink: 0;
}

.control-section:nth-child(2) {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.control-section:last-child {
    padding-bottom: 12px;
    flex-shrink: 0;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.control-section:nth-child(-n+3) .section-title {
    background: #39A9FF;
    color: white;
    margin: -20px -16px 16px -16px;
    padding: 6px 16px;
}

.control-section:nth-child(1) .section-title {
    margin: 0 -16px 16px -16px;
}

.control-group {
    margin-bottom: 12px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.mobile-select,
.mobile-input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-primary);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.mobile-select {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23666' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.mobile-input:focus,
.mobile-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

/* Custom Select Dropdown */
.custom-select {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    width: 100%;
    height: 44px;
    padding: 0 36px 0 12px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    transition: all 0.2s;
}

.custom-select-trigger:hover {
    border-color: var(--primary-color);
}

.custom-select.open .custom-select-trigger {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

.custom-select-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    object-fit: contain;
}

.custom-select-trigger span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s;
    pointer-events: none;
    color: var(--text-secondary);
}

.custom-select.open .custom-select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.custom-select.open .custom-select-dropdown {
    display: block;
}

/* Scroll indicator for dropdown - top */
.custom-select-dropdown.has-scroll::before {
    content: '⌄';
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.95) 40%, rgba(255, 255, 255, 0.98) 100%);
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1;
    margin-bottom: -50px;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    padding-bottom: 8px;
    transform: scaleY(-1);
}

.custom-select-dropdown.scrolled-to-top::before {
    display: none;
}

/* Scroll indicator for dropdown - bottom */
.custom-select-dropdown.has-scroll::after {
    content: '⌄';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.95) 40%, rgba(255, 255, 255, 0.98) 100%);
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1;
    margin-top: -50px;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    padding-bottom: 8px;
}

.custom-select-dropdown.scrolled-to-bottom::after {
    display: none;
}

.custom-select-option {
    padding: 10px 12px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.15s;
}

.custom-select-option:hover {
    background-color: rgba(0, 120, 212, 0.08);
}

.custom-select-option.selected {
    background-color: rgba(0, 120, 212, 0.12);
    font-weight: 500;
}

.custom-select-option span {
    flex: 1;
}

.control-group-row {
    display: flex;
    gap: 12px;
}

.control-group-inline {
    flex: 1;
}

.control-group-inline label {
    font-size: 13px;
}

.mobile-input-small {
    width: 100%;
    height: 40px;
    padding: 0 10px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-primary);
}

.mobile-input-small:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

.hint-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    line-height: 1.4;
}

.hint-text code {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    background: var(--background);
    padding: 2px 4px;
    border-radius: 3px;
}

/* Transfer Function Input Wrapper */
.transfer-input-wrapper {
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-width: 100%;
}

.transfer-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-right: 8px;
}

.transfer-input {
    flex: 1;
    min-width: 0;
}

.transfer-input-wrapper .mobile-input {
    border-radius: 8px;
    width: 100%;
}

.transfer-input-wrapper .unit {
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-left: none;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    flex-shrink: 0;
}

.transfer-input-wrapper .mobile-input:focus + .unit {
    border-color: var(--primary-color);
}

/* Input with Unit */
.input-with-unit {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.input-with-unit .mobile-input,
.input-with-unit .mobile-input-small {
    flex: 1;
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-with-unit .unit {
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-left: none;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    flex-shrink: 0;
}

.input-with-unit .mobile-input:focus + .unit,
.input-with-unit .mobile-input-small:focus + .unit {
    border-color: var(--primary-color);
}

.transfer-function-input {
    font-family: 'Courier New', 'Consolas', monospace;
    font-weight: bold;
}

.transfer-function-input:read-only {
    background: #E8E8E8;
    color: #999999;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Bandwidth Controls */
.bandwidth-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    padding: 8px 0;
}

.bandwidth-controls span {
    font-size: 18px;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

.btn-icon {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:active {
    background: var(--background);
    transform: scale(0.95);
}

/* Buttons */
.btn-secondary {
    height: 44px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:active {
    background: var(--background);
    transform: scale(0.98);
}

.btn-compact {
    height: 40px;
    padding: 0 16px;
    font-size: 13px;
    margin-left: 8px;
    align-self: flex-end;
}

.full-width {
    width: 100%;
    margin-top: 8px;
}

/* Transfer Function Visual */
.transfer-function-visual {
    margin-top: 12px;
    padding: 12px;
    background: var(--background);
    border-radius: 8px;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    text-align: center;
}

.transfer-function-visual .katex {
    font-size: 24px !important;
}

/* Transfer Function in Main Content */
.transfer-function-main {
    padding: 0px 0px 9px 0px;
    text-align: center;
    min-height: 40px;
}

.latex-with-button {
    display: inline-block;
    white-space: nowrap;
}

.latex-with-button #latexDisplayMain {
    display: inline-block;
    vertical-align: middle;
}

.latex-with-button #latexDisplayMain .katex {
    font-size: 22px !important;
}

.edit-transfer-btn {
    width: 36px;
    height: 28px;
    border: none;
    background: linear-gradient(to bottom, #e8e8e8 0%, #c8c8c8 100%);
    color: #555;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    transition: all 0.1s;
    margin-left: 6px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid #999;
}

.edit-transfer-btn:active {
    background: linear-gradient(to bottom, #c8c8c8 0%, #e8e8e8 100%);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    transform: translateY(1px);
}

.latex-hint {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.4;
    text-align: center;
}

.latex-hint .katex {
    font-size: 11px !important;
}

/* Frequency Info Checkboxes */
.frequency-info-checkboxes {
    margin-top: 0px;
    margin-bottom: 12px;
    padding: 0px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.frequency-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-item label {
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.error-message {
    color: var(--danger-color);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 8px;
    min-height: 0;
    height: calc(100% - var(--header-height)); /* Explicit height */
}

/* Chart Sections */
.chart-section {
    flex: 2.2; 
    display: flex;
    flex-direction: column;
    min-height: 0;
    /* 2/3 of parent minus proportional gap (2/3 of 16px = ~11px) */
    height: calc(66.66% - 11px);
}

.signals-section {
    flex: 1; /* Takes 1/3 of available space */
    display: flex;
    flex-direction: column;
    min-height: 0;
    /* 1/3 of parent minus proportional gap (1/3 of 16px = ~5px) */
    height: calc(33.33% - 5px);
}

.bode-instruction {
    font-size: 13px;
    color: var(--primary-color);
    margin-bottom: 8px;
    line-height: 1.4;
    text-align: center;
    flex-shrink: 0;
}

.bode-instruction #f0Display,
.bode-instruction #f0Value {
    font-weight: 600;
    color: var(--primary-color);
}

.canvas-wrapper {
    background: var(--surface);
    border-radius: 8px;
    padding: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    box-sizing: border-box;
    position: relative;
}

/* Specific styling for chart-section canvas-wrapper to maximize height */
.chart-section .canvas-wrapper {
    gap: 0;
    padding-bottom: 20px;
}

.chart-section .canvas-wrapper canvas {
    display: block;
}

/* K Parameter Slider (PWA horizontal) */
.k-slider-container {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border-radius: 8px;
    margin-top: 8px;
    box-shadow: var(--shadow);
}

.k-slider-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    min-width: 70px;
}

.k-slider-label #kValue {
    color: var(--primary-color);
}

/* K slider - Orange */
.k-slider-label-k #kValue {
    color: #FD8325;
}

/* Q slider - Purple */
.q-slider-label-q #qValue {
    color: #D22AFF;
}

.k-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #e0e0e0 0%, var(--primary-color) 100%);
    border-radius: 3px;
    outline: none;
}

.k-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.k-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* K slider - Orange (more specific selectors to override defaults) */
.k-slider-orange {
    background: linear-gradient(to right, #e0e0e0 0%, #FD8325 100%);
}

.k-slider-orange::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FD8325;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.k-slider-orange::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FD8325;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Q slider - Purple (more specific selectors to override defaults) */
.q-slider-purple {
    background: linear-gradient(to right, #e0e0e0 0%, #D22AFF 100%);
}

.q-slider-purple::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #D22AFF;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.q-slider-purple::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #D22AFF;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

/* Signal Container */
.signal-container {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Compact Audio Button */
.audio-btn-compact {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 10;
}

.audio-btn-input {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.audio-btn-input:active {
    background: var(--secondary-color);
    color: white;
}

.audio-btn-input.playing {
    background: var(--secondary-color);
    color: white;
}

.audio-btn-output {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.audio-btn-output:active {
    background: var(--danger-color);
    color: white;
}

.audio-btn-output.playing {
    background: var(--danger-color);
    color: white;
}

.audio-btn-compact svg {
    flex-shrink: 0;
}

/* Zoom Indicator */
.zoom-indicator {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    pointer-events: none;
    z-index: 5;
}

.zoom-label-vertical {
    font-size: 11px;
    font-weight: 600;
    color: #000000;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 1px;
}

.zoom-arrow {
    font-size: 12px;
    color: #000000;
    line-height: 1;
}

/* Loading State */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive adjustments for larger phones */
@media (min-width: 400px) {
    .bode-instruction {
        font-size: 14px;
    }
}

/* Tablet and larger adjustments */
@media (min-width: 768px) {
    .app-header h1 {
        font-size: 20px;
    }

    .main-content {
        max-width: 800px;
        margin: 0 auto;
    }

    .bode-instruction {
        font-size: 15px;
    }
}

/* About Screen */
.about-screen {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
    overflow-y: auto;
}

.about-screen.active {
    opacity: 1;
    visibility: visible;
}

.about-content {
    padding: 40px 20px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.about-icon {
    width: 128px;
    height: 128px;
    margin-bottom: 20px;
}

.about-content h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.about-version {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.about-author {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.about-email {
    font-size: 14px;
    margin-bottom: 24px;
}

.about-email a {
    color: var(--primary-color);
    text-decoration: none;
}

.about-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 32px;
}

.about-text a {
    color: var(--primary-color);
    text-decoration: none;
}

.about-text a:hover {
    text-decoration: underline;
}

.about-related {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--background);
    border-radius: 8px;
    margin-bottom: 32px;
    text-align: left;
}

.about-related-icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.about-related-text {
    flex: 1;
}

.about-related-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.about-related-text a {
    font-size: 14px;
    color: #493AF0;
    text-decoration: none;
}

.about-related-text a:hover {
    text-decoration: underline;
}

.btn-update-app {
    width: 100%;
    height: 48px;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.btn-update-app:active {
    background: #f0f0f0;
}

.btn-update-app:disabled {
    background: #f5f5f5;
    color: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-close-about {
    width: 100%;
    height: 48px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-close-about:active {
    background: var(--primary-dark);
}

/* PWA Install Prompt */
.install-prompt {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    z-index: 4000;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.install-prompt.active {
    transform: translateY(0);
}

.install-prompt-content {
    padding: 24px 20px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.install-prompt-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.install-prompt-close:active {
    background: var(--background);
}

.install-prompt-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.install-prompt-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.install-instructions {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
}
