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

body {
    font-family: 'Noto Sans TC', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Header Styles */
.header {
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.heart-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.heart-icon-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: transparent;
    padding: 0;
    object-fit: contain;
}

.heart-icon span {
    font-weight: 500;
    font-size: 14px;
}

.title-section h1 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 5px;
    font-weight: 700;
}

.title-section h2 {
    font-size: 18px;
    color: #7f8c8d;
    margin-bottom: 20px;
    font-weight: 400;
}

.basic-info {
    display: flex;
    gap: 20px;
}

.name-input, .student-id-input {
    padding: 10px;
    border: 2px solid #bdc3c7;
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
    width: 200px;
}

/* Main Content - Single Column Layout */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

/* Remove left-panel styles - now using single column */

.section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.section-icon {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.section-icon span {
    font-weight: 500;
    font-size: 16px;
    text-align: left;
    color: #2c3e50;
}

/* Calendar Icon */
.calendar-icon {
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
}

.calendar-body {
    width: 100%;
    height: 100%;
    border: 2px solid #34495e;
    border-radius: 8px;
    background-color: white;
    display: flex;
    flex-direction: column;
}

.calendar-header {
    height: 15px;
    background-color: #34495e;
    border-radius: 6px 6px 0 0;
}

.calendar-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2px;
    padding: 4px;
}

.grid-item {
    background-color: #34495e;
    border-radius: 2px;
}

/* Section Icons */
.section-icon-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.upload-icon-container, .ai-icon-container, .description-icon-container {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-icon-emoji, .description-icon-emoji {
    font-size: 36px;
}

/* Learning Icon */
.learning-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Input Groups */
.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.voice-input-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

input[type="text"], textarea {
    padding: 15px;
    border: 2px solid #bdc3c7;
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

input[type="text"]:focus, textarea:focus {
    outline: none;
    border-color: #3498db;
}

textarea {
    min-height: 120px;
    flex: 1;
}

/* Date Time Containers */
.datetime-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.datetime-label {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-input, .time-input, .start-time-input, .end-time-input {
    padding: 12px 15px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    background-color: white;
    transition: all 0.3s;
    cursor: pointer;
}

.date-input:focus, .time-input:focus, .start-time-input:focus, .end-time-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.date-input:hover, .time-input:hover, .start-time-input:hover, .end-time-input:hover {
    border-color: #3498db;
    background-color: #f8f9fa;
}

/* Custom styling for date/time inputs */
.date-input::-webkit-calendar-picker-indicator,
.time-input::-webkit-calendar-picker-indicator,
.start-time-input::-webkit-calendar-picker-indicator,
.end-time-input::-webkit-calendar-picker-indicator {
    background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233498db' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'%3e%3c/path%3e%3cpolyline points='9,22 9,12 15,12 15,22'%3e%3c/polyline%3e%3c/svg%3e") no-repeat;
    background-size: 20px 20px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.date-input::-webkit-calendar-picker-indicator:hover,
.time-input::-webkit-calendar-picker-indicator:hover,
.start-time-input::-webkit-calendar-picker-indicator:hover,
.end-time-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Quick Date/Time Buttons */
.quick-date-buttons, .quick-time-buttons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.quick-btn {
    padding: 6px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 15px;
    background: white;
    color: #7f8c8d;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.quick-btn:hover {
    border-color: #3498db;
    color: #3498db;
    background-color: rgba(52, 152, 219, 0.05);
    transform: translateY(-1px);
}

.quick-btn:active {
    transform: translateY(0);
    background-color: rgba(52, 152, 219, 0.1);
}

.bed-input, .case-input {
    width: 100%;
}

.patient-info-row {
    display: flex;
    gap: 15px;
}

.patient-info-row-with-label {
    display: flex;
    gap: 15px;
}

.patient-info-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.patient-info-item label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.patient-info-item-full {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
}

.patient-info-item-full label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.age-input, .sex-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #bdc3c7;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    background-color: white;
    transition: all 0.3s;
}

.age-input:focus, .sex-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.age-input:hover, .sex-input:hover {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.pod-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #bdc3c7;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    background-color: white;
    transition: all 0.3s;
}

.pod-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.pod-input:hover {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.diagnosis-input, .reason-input {
    width: 100%;
}

.ai-feedback-input {
    min-height: 150px !important;
    padding: 15px !important;
    font-family: 'Noto Sans TC', sans-serif !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    background-color: #ffffff !important;
    border: 2px solid #95a5a6 !important;
    border-radius: 6px !important;
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
}

.ai-feedback-input:focus {
    border-color: #3498db !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.2) !important;
}

.ai-feedback-input::placeholder {
    font-family: 'Noto Sans TC', sans-serif !important;
    font-size: 13px !important;
    color: #7f8c8d !important;
    line-height: 1.5;
}

.summary-report-input {
    min-height: 250px !important;
    width: 100% !important;
    padding: 20px !important;
    font-family: 'Noto Sans TC', sans-serif !important;
    font-size: 14px !important;
    line-height: 1.8 !important;
    background-color: #ffffff !important;
    border: 2px solid #95a5a6 !important;
    border-radius: 6px !important;
    resize: vertical;
    box-sizing: border-box;
}

.summary-report-input:focus {
    border-color: #3498db !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.2) !important;
}

.summary-report-input::placeholder {
    font-family: 'Noto Sans TC', sans-serif !important;
    font-size: 13px !important;
    color: #7f8c8d !important;
    font-style: italic !important;
}

/* Voice Button */
.voice-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.voice-btn:hover {
    background-color: #ecf0f1;
}

.voice-btn img {
    width: 24px;
    height: 24px;
}

.voice-btn.recording {
    background-color: #e74c3c;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Upload Section */
.upload-description {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.4;
}

/* Remove right-panel styles - now using single column */

.upload-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.upload-box {
    border: 3px dashed #f39c12;
    border-radius: 15px;
    background-color: #fff3cd;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-box:hover {
    background-color: #ffeaa7;
    border-color: #e17055;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.3);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.upload-icon {
    font-size: 36px;
    margin-bottom: 0;
}

.upload-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.upload-description {
    font-size: 14px;
    color: #7f8c8d;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 20px;
    max-width: 280px;
}

.upload-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    border: 2px solid #27ae60;
    border-radius: 12px;
    background: white;
    color: #27ae60;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.upload-btn:hover {
    background: #27ae60;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-icon {
    font-size: 24px;
}

.btn-text {
    font-size: 14px;
    font-weight: 500;
}

.upload-hint {
    font-size: 12px;
    color: #7f8c8d;
    font-style: italic;
}

.uploaded-images {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Single image display - larger size */
.uploaded-images .uploaded-image {
    max-width: 300px;
    width: 100%;
}

.uploaded-images .uploaded-image img {
    height: 200px;
}

.uploaded-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.uploaded-image img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}

.remove-image:hover {
    background: #e74c3c;
    transform: scale(1.1);
}

.image-info {
    padding: 8px;
    background: white;
    border-radius: 0 0 8px 8px;
    border-top: 1px solid #ecf0f1;
}

.file-name {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 11px;
    color: #7f8c8d;
}

/* Camera Modal Styles */
.camera-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.camera-content {
    background: white;
    border-radius: 15px;
    padding: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.camera-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.camera-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
}

.close-camera {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #7f8c8d;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s;
}

.close-camera:hover {
    background: #ecf0f1;
    color: #e74c3c;
}

#cameraVideo {
    width: 100%;
    max-height: 400px;
    border-radius: 10px;
    background: #000;
    object-fit: cover;
}

.camera-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.capture-btn, .switch-camera-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.capture-btn {
    background: #3498db;
    color: white;
}

.capture-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.switch-camera-btn {
    background: #95a5a6;
    color: white;
}

.switch-camera-btn:hover {
    background: #7f8c8d;
}

/* Upload Toast Messages */
.upload-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    animation: slideInUp 0.3s ease-out;
    max-width: 300px;
}

.upload-toast.success {
    background: #27ae60;
}

.upload-toast.error {
    background: #e74c3c;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.image-description {
    margin-top: 20px;
}

/* Force cache refresh - all textareas should be 120px height now */
.description-input {
    min-height: 120px !important;
    padding: 15px !important;
    font-size: 16px !important;
}

/* Learning Container Styles */
.learning-container {
    background-color: #f8f9fa;
    border: 2px solid #17a2b8;
    border-radius: 8px;
    padding: 20px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.combined-learning-input {
    min-height: 200px !important;
    padding: 15px !important;
    font-family: 'Noto Sans TC', sans-serif !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    background-color: #ffffff !important;
    border: 2px solid #95a5a6 !important;
    border-radius: 6px !important;
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
}

.combined-learning-input:focus {
    border-color: #17a2b8 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 8px rgba(23, 162, 184, 0.2) !important;
}

.combined-learning-input::placeholder {
    font-family: 'Noto Sans TC', sans-serif !important;
    font-size: 13px !important;
    color: #7f8c8d !important;
    line-height: 1.5;
}

.character-counter {
    display: flex;
    justify-content: flex-end;
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.character-counter .current-count {
    font-weight: 600;
    color: #17a2b8;
}

.character-counter.warning .current-count {
    color: #ffc107;
}

.character-counter.danger .current-count {
    color: #dc3545;
}

/* Laboratory Data Container */
.lab-data-container {
    background-color: #f8f9fa;
    border: 2px solid #27ae60;
    border-radius: 8px;
    padding: 20px;
    margin-top: 10px;
}

/* Lab Category Buttons */
.lab-category-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.lab-category-btn {
    padding: 10px 16px;
    border: 2px solid #3498db;
    background-color: white;
    color: #3498db;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 14px;
}

.lab-category-btn:hover {
    background-color: #3498db;
    color: white;
}

.lab-category-btn.active {
    background-color: #2980b9;
    color: white;
    border-color: #2980b9;
}

/* Lab Quick Inputs */
.lab-quick-inputs {
    display: none;
    margin-bottom: 20px;
}

.lab-quick-inputs.active {
    display: block;
}

.lab-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.lab-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.lab-item label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 13px;
}

.lab-value {
    padding: 8px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    background-color: white;
    transition: border-color 0.3s ease;
}

.lab-value:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* Infection checkboxes and radios styling */
#infection-inputs input[type="checkbox"],
#infection-inputs input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

#infection-inputs label {
    cursor: pointer;
    font-weight: normal;
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

#infection-inputs .lab-item label {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    color: #2c3e50;
    font-size: 13px;
}

/* Lab Output Section */
.lab-output-section {
    border-top: 1px solid #ecf0f1;
    padding-top: 20px;
}

.lab-output-group {
    margin-bottom: 15px;
}

.lab-output-label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 15px;
}

.lab-data-input {
    min-height: 150px !important;
    width: 100% !important;
    padding: 20px !important;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    letter-spacing: 0.5px !important;
    background-color: #ffffff !important;
    border: 2px solid #95a5a6 !important;
    border-radius: 6px !important;
    resize: vertical;
    box-sizing: border-box;
}

.lab-data-input:focus {
    border-color: #3498db !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.2) !important;
}

.lab-data-input::placeholder {
    font-family: 'Noto Sans TC', sans-serif !important;
    font-size: 13px !important;
    color: #7f8c8d !important;
    font-style: italic !important;
}

/* Lab Action Buttons */
.lab-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.lab-action-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 14px;
}

.lab-action-btn:not(.secondary) {
    background-color: #27ae60;
    color: white;
}

.lab-action-btn:not(.secondary):hover {
    background-color: #229954;
}

.lab-action-btn.secondary {
    background-color: #95a5a6;
    color: white;
}

.lab-action-btn.secondary:hover {
    background-color: #7f8c8d;
}

/* Lab Free Input Section */
.lab-free-input-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 2px dashed #3498db;
    border-radius: 8px;
}

.lab-free-label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 15px;
}


.lab-free-input {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    background-color: white;
    resize: vertical;
    transition: all 0.3s ease;
}

.lab-free-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.3);
    background-color: #ffffff;
}

.lab-free-input::placeholder {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 13px;
    color: #7f8c8d;
    line-height: 1.5;
}

/* Lab Subgroups */
.lab-subgroup {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #fafafa;
    border: 1px solid #e0e6ed;
    border-radius: 6px;
}

.lab-subgroup-title {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Diagnosis & Treatment Plan Container */
.diagnosis-treatment-container {
    background-color: #f8f9fa;
    border: 2px solid #6f42c1;
    border-radius: 8px;
    padding: 20px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comprehensive-diagnosis-input,
.treatment-plan-input {
    min-height: 120px !important;
    padding: 15px !important;
    font-family: 'Noto Sans TC', sans-serif !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    background-color: #ffffff !important;
    border: 2px solid #95a5a6 !important;
    border-radius: 6px !important;
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
}

/* 確保每個語音輸入組都是單欄布局 */
.diagnosis-treatment-container .voice-input-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.comprehensive-diagnosis-input:focus,
.treatment-plan-input:focus {
    border-color: #6f42c1 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 8px rgba(111, 66, 193, 0.2) !important;
}

.comprehensive-diagnosis-input::placeholder,
.treatment-plan-input::placeholder {
    font-family: 'Noto Sans TC', sans-serif !important;
    font-size: 13px !important;
    color: #7f8c8d !important;
    line-height: 1.5;
}

.section-label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 15px;
}

/* Inline Description Styles */
.description-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Removed .textarea-with-voice - all voice inputs now use .voice-input-group */

/* Inline AI Assistant Styles */
.ai-assistant-inline {
    margin-top: 20px;
    padding: 20px;
    border: 2px solid #3498db;
    border-radius: 15px;
    background-color: #ffffff;
}

.ai-inline-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    justify-content: center;
}

.ai-inline-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
}

.ai-links-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    max-width: 500px;
}

.ai-link.primary {
    background-color: #27ae60;
    color: white;
    border: 2px solid #27ae60;
}

.ai-link.primary:hover {
    background-color: #229954;
    border-color: #229954;
    color: white;
}

.ai-link.secondary {
    background-color: white;
    color: #3498db;
    border: 2px solid #3498db;
}

.ai-link.secondary:hover {
    background-color: #3498db;
    color: white;
}

.ai-link.backup {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 2px solid #6c757d;
    font-size: 14px;
}

.ai-link.backup:hover {
    background-color: #6c757d;
    color: white;
}

.ai-instruction {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

.ai-instruction p {
    margin: 5px 0;
    font-size: 14px;
    color: #2c3e50;
    line-height: 1.4;
}

.ai-instruction p:first-child {
    font-weight: 600;
    color: #27ae60;
    margin-bottom: 8px;
}

.prompt-box {
    background-color: #e8f5e8;
    border: 2px solid #27ae60;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    position: relative;
}

.prompt-box p {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: #2c3e50 !important;
    background-color: transparent !important;
    border: none !important;
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
    font-style: italic;
}

.copy-prompt-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.copy-prompt-btn:hover {
    background-color: #229954;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

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

/* AI Assistant */
.ai-assistant {
    display: flex;
    justify-content: center;
    padding: 20px;
    width: 100%;
}

.ai-assistant .ai-inline-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 600px;
}

.ai-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-icon-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.ai-link {
    font-size: 18px;
    font-weight: 500;
    color: #3498db;
    text-decoration: none;
    padding: 15px 30px;
    border: 2px solid #3498db;
    border-radius: 25px;
    transition: all 0.3s;
    display: inline-block;
    background-color: white;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.ai-link.primary {
    background-color: #27ae60;
    color: white;
    border-color: #27ae60;
}

.ai-link.primary:hover {
    background-color: #229954;
    border-color: #229954;
    color: white;
}

.ai-link:hover {
    background-color: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Custom Dropdown Styles */
.dropdown-container {
    margin-bottom: 20px;
}

.dropdown-label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border: 2px solid #bdc3c7;
    border-radius: 5px;
    background-color: white;
    cursor: pointer;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.dropdown-header:hover {
    border-color: #3498db;
}

.dropdown-header.active {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.dropdown-placeholder {
    color: #7f8c8d;
    flex: 1;
}

.dropdown-placeholder.has-selection {
    color: #2c3e50;
}

.dropdown-arrow {
    color: #7f8c8d;
    font-size: 12px;
    transition: transform 0.3s;
}

.dropdown-header.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #3498db;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dropdown-options.show {
    display: block;
}

.dropdown-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.dropdown-option:hover {
    background-color: #ecf0f1;
}

.dropdown-option input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.dropdown-option label {
    cursor: pointer;
    flex: 1;
    margin: 0;
    font-size: 14px;
}

.dropdown-option.has-submenu {
    padding-right: 35px;
}

.submenu-arrow {
    position: absolute;
    right: 15px;
    font-size: 12px;
    color: #7f8c8d;
    transition: all 0.3s;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
}

.dropdown-option.has-submenu:hover .submenu-arrow,
.submenu-arrow:hover {
    color: #3498db;
    background-color: rgba(52, 152, 219, 0.1);
}

.dropdown-option.submenu-open .submenu-arrow {
    transform: rotate(90deg);
    color: #3498db;
}

.submenu {
    position: absolute;
    left: 100%;
    top: 0;
    background: white;
    border: 2px solid #3498db;
    border-radius: 5px;
    min-width: 200px;
    max-width: 250px;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
}

/* For screens smaller than tablets, show submenu inline */
@media (max-width: 1024px) {
    .submenu {
        position: static;
        left: auto;
        top: auto;
        width: 100%;
        border: none;
        border-top: 1px solid #ecf0f1;
        border-radius: 0;
        box-shadow: none;
        background-color: #f8f9fa;
        margin-top: 5px;
        max-width: none;
    }
    
    .submenu-option {
        padding: 8px 15px;
        border-bottom: 1px solid #ecf0f1;
    }
    
    .submenu-option:last-child {
        border-bottom: none;
    }
}

.dropdown-option:hover .submenu,
.dropdown-option.submenu-open .submenu {
    display: block;
}

.submenu-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submenu-option:hover {
    background-color: #ecf0f1;
}

.submenu-option input[type="checkbox"] {
    margin-right: 8px;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.submenu-option label {
    cursor: pointer;
    margin: 0;
    font-size: 13px;
}

.others-input {
    margin-top: 10px;
    padding: 10px;
    border: 2px solid #f39c12;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    width: 100%;
    background-color: #fff3cd;
    transition: border-color 0.3s;
}

.others-input:focus {
    outline: none;
    border-color: #e67e22;
    background-color: white;
}

.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    min-height: 20px;
}

.tag {
    display: inline-flex;
    align-items: center;
    background-color: #3498db;
    color: white;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.tag.others-tag {
    background-color: #f39c12;
}

.tag.submenu-tag {
    background-color: #27ae60;
}

.tag-remove {
    margin-left: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.tag-remove:hover {
    opacity: 1;
}

/* Scrollbar for dropdown */
.dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 3px;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

/* Enhanced Voice Recognition Styles */
.recording-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.recording-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 350px;
    width: 90%;
}

.recording-animation {
    width: 80px;
    height: 80px;
    border: 4px solid #e74c3c;
    border-radius: 50%;
    margin: 0 auto 20px;
    position: relative;
    animation: pulse-border 1.5s infinite;
}

.recording-animation::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: #e74c3c;
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-border {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse-dot {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.recording-text {
    display: block;
    font-size: 18px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 15px;
}

.recording-timer {
    font-size: 24px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
}

.stop-recording-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.stop-recording-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.interim-preview {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(52, 152, 219, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    z-index: 9999;
    display: none;
    max-width: 80%;
    word-wrap: break-word;
}

.voice-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    max-width: 350px;
    word-wrap: break-word;
    animation: slideInRight 0.3s ease-out;
}

.voice-toast.success {
    background: #27ae60;
}

.voice-toast.error {
    background: #e74c3c;
}

.toast-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-message {
    line-height: 1.4;
}

.toast-button {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.toast-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Enhanced voice button styles */
.voice-btn {
    position: relative;
    overflow: hidden;
}

.voice-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.3);
    transform: translate(-50%, -50%);
    transition: all 0.3s;
}

.voice-btn.recording::after {
    width: 100%;
    height: 100%;
    animation: recording-ripple 1s infinite;
}

@keyframes recording-ripple {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .main-content {
        gap: 25px;
        padding: 0 10px;
    }
    
    .section {
        flex-direction: column;
        gap: 10px !important;
        margin-bottom: 25px !important;
    }
    
    .section-icon {
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: 10px !important;
        margin-bottom: 10px !important;
    }
    
    .section-icon span {
        font-size: 15px !important;
        text-align: left !important;
    }
    
    .basic-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .name-input, .student-id-input {
        width: 100%;
    }
    
    .patient-info-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .age-input, .sex-input {
        width: 100%;
        font-size: 15px;
        padding: 10px 12px;
    }
    
    .pod-input {
        width: 100%;
        font-size: 15px;
        padding: 10px 12px;
    }
    
    .voice-input-group {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .voice-input-group textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        resize: vertical !important;
    }
    
    .voice-input-group .voice-btn {
        align-self: flex-end;
        margin: 10px 0 0 0;
        width: 48px;
        height: 48px;
        min-width: 48px;
        flex-shrink: 0;
    }
    
    /* Removed duplicate voice-btn - using voice-input-group .voice-btn instead */
    
    /* Mobile DateTime Optimizations */
    .datetime-container {
        margin-bottom: 12px;
    }
    
    .datetime-label {
        font-size: 13px;
    }
    
    .date-input, .time-input, .start-time-input, .end-time-input {
        padding: 10px 12px;
        font-size: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Ensure all textareas fit mobile screen */
    textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Mobile-specific lab data input optimization */
    .lab-data-input {
        min-height: 120px !important;
        width: 100% !important;
        font-size: 14px !important;
        line-height: 1.6 !important;
        padding: 15px !important;
        box-sizing: border-box !important;
    }
    
    /* Mobile lab system adjustments */
    .lab-data-container {
        padding: 15px !important;
    }
    
    .lab-category-buttons {
        gap: 8px !important;
    }
    
    .lab-category-btn {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
    
    .lab-input-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
        gap: 10px !important;
    }
    
    .lab-value {
        padding: 6px 8px !important;
        font-size: 13px !important;
    }
    
    .lab-actions {
        gap: 8px !important;
    }
    
    .lab-action-btn {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
    
    /* Mobile lab free input adjustments */
    .lab-free-input-section {
        padding: 12px !important;
        margin-top: 15px !important;
    }
    
    .lab-free-input {
        min-height: 100px !important;
        font-size: 13px !important;
        padding: 10px !important;
    }
    
    /* Mobile lab subgroup adjustments */
    .lab-subgroup {
        margin-bottom: 20px !important;
        padding: 12px !important;
    }
    
    .lab-subgroup-title {
        font-size: 15px !important;
        margin-bottom: 12px !important;
    }
    
    /* Mobile diagnosis & treatment plan adjustments */
    .diagnosis-treatment-container {
        padding: 15px !important;
        margin-top: 10px !important;
        gap: 15px !important;
    }
    
    .comprehensive-diagnosis-input,
    .treatment-plan-input {
        min-height: 100px !important;
        font-size: 14px !important;
        padding: 12px !important;
        width: 100% !important;
    }
    
    .section-label {
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }
    
    .diagnosis-treatment-container .voice-input-group {
        width: 100% !important;
        margin-bottom: 0 !important;
    }
    
    /* Mobile learning container adjustments */
    .learning-container {
        padding: 15px !important;
        margin-top: 10px !important;
        gap: 12px !important;
    }
    
    .combined-learning-input {
        min-height: 150px !important;
        font-size: 14px !important;
        padding: 12px !important;
        width: 100% !important;
    }
    
    .character-counter {
        font-size: 11px !important;
        margin-top: 8px !important;
    }
    
    /* Mobile AI feedback adjustments */
    .ai-feedback-input {
        min-height: 120px !important;
        font-size: 14px !important;
        padding: 12px !important;
        width: 100% !important;
    }
    
    /* Mobile summary report adjustments */
    .summary-report-input {
        min-height: 200px !important;
        font-size: 14px !important;
        padding: 15px !important;
        width: 100% !important;
        line-height: 1.6 !important;
    }
    
    .learning-container .voice-input-group {
        width: 100% !important;
        margin-bottom: 0 !important;
    }
    
    .quick-date-buttons, .quick-time-buttons {
        gap: 6px;
        margin-top: 6px;
    }
    
    .quick-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .uploaded-images {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    /* Mobile upload optimizations */
    .upload-box {
        min-height: 150px;
        padding: 15px;
    }
    
    .upload-icon {
        font-size: 28px;
    }
    
    .upload-title {
        font-size: 16px;
    }
    
    .upload-description {
        font-size: 13px;
        max-width: 260px;
        margin-bottom: 15px;
    }
    
    .upload-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .btn-icon {
        font-size: 20px;
    }
    
    .btn-text {
        font-size: 13px;
    }
    
    .camera-content {
        padding: 15px;
        max-width: 95%;
    }
    
    #cameraVideo {
        max-height: 250px;
    }
    
    .camera-controls {
        gap: 10px;
        margin-top: 15px;
    }
    
    .capture-btn, .switch-camera-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .upload-toast {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .dropdown-options {
        position: fixed !important;
        left: 5px !important;
        right: 5px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: auto !important;
        max-height: 70vh !important;
        z-index: 9999 !important;
        border: 2px solid #3498db !important;
        background: white !important;
        border-radius: 12px !important;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* 手機下拉選單選項優化 */
    .dropdown-option {
        padding: 15px 20px !important;
        font-size: 16px !important;
        border-bottom: 1px solid #ecf0f1 !important;
        min-height: 48px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .dropdown-option:last-child {
        border-bottom: none !important;
    }
    
    .dropdown-option input[type="checkbox"] {
        width: 20px !important;
        height: 20px !important;
        margin-right: 15px !important;
    }
    
    /* 手機下拉選單標題優化 */
    .dropdown-header {
        padding: 15px !important;
        font-size: 16px !important;
        min-height: 48px !important;
        touch-action: manipulation !important;
    }
    
    .dropdown-arrow {
        font-size: 18px !important;
    }
    
    /* 手機子選單優化 */
    .submenu-option {
        padding: 12px 20px 12px 40px !important;
        font-size: 15px !important;
        min-height: 44px !important;
    }
    
    .submenu-option input[type="checkbox"] {
        width: 18px !important;
        height: 18px !important;
        margin-right: 12px !important;
    }
    
    
    .selected-tags {
        gap: 6px;
    }
    
    .tag {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    /* Mobile voice recognition optimizations */
    .recording-content {
        padding: 20px;
        max-width: 300px;
    }
    
    .recording-animation {
        width: 60px;
        height: 60px;
    }
    
    .recording-text {
        font-size: 16px;
    }
    
    .recording-timer {
        font-size: 20px;
    }
    
    .voice-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        margin: 0 10px;
    }
    
    .interim-preview {
        top: 10px;
        left: 10px;
        right: 10px;
        transform: none;
        max-width: none;
        margin: 0 10px;
    }
    
    /* Mobile AI Assistant optimizations */
    .ai-inline-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .ai-links-container {
        width: 100%;
        max-width: none;
    }
    
    .ai-link {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .ai-instruction {
        margin-top: 15px;
        padding: 12px;
    }
    
    .ai-instruction p {
        font-size: 13px;
        text-align: left;
    }
    
    /* Mobile prompt box optimization */
    .prompt-box {
        padding: 12px;
        margin: 8px 0;
    }
    
    .prompt-box p {
        font-size: 12px !important;
        line-height: 1.4 !important;
    }
    
    .copy-prompt-btn {
        width: 100%;
        padding: 10px 16px;
        font-size: 13px;
        justify-content: center;
    }
    
    /* Mobile copy toast */
    .copy-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .title-section h1 {
        font-size: 24px;
    }
    
    .title-section h2 {
        font-size: 16px;
    }
    
    .heart-icon-img {
        width: 60px;
        height: 60px;
    }
    
    .upload-box {
        padding: 20px;
        min-height: 150px;
    }
    
    .ai-assistant {
        padding: 20px;
    }
}

/* Auto-save controls removed - only background auto-save remains */

/* Auto-save Toast Messages */
.save-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #2ecc71;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
    max-width: 300px;
    word-wrap: break-word;
}

.save-toast.error {
    background: #e74c3c;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.save-toast.info {
    background: #3498db;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* Mobile dropdown overlay */
.dropdown-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

.dropdown-overlay.show {
    display: block;
}

/* Copy toast styles */
.copy-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #27ae60;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 10001;
    animation: slideInRight 0.3s ease-out;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
    max-width: 300px;
    word-wrap: break-word;
}

.copy-toast.error {
    background: #e74c3c;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}


.permission-guide h3 {
    margin: 0 0 15px 0;
    color: #e74c3c !important;
    font-size: 18px !important;
    text-align: center;
    background: transparent !important;
}

.guide-steps {
    margin: 15px 0;
}

.guide-steps p {
    margin: 8px 0 !important;
    padding: 8px 12px !important;
    background: #f8f9fa !important;
    border-radius: 6px !important;
    border-left: 4px solid #3498db !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #333333 !important;
}

.alternative {
    margin-top: 15px;
    padding: 10px;
    background: #e8f5e8;
    border-radius: 6px;
    border-left: 4px solid #27ae60;
}

.alternative p {
    margin: 0;
    color: #27ae60;
    font-size: 13px;
}

.troubleshooting {
    margin-top: 15px;
    padding: 10px;
    background: #fff3cd;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
}

.troubleshooting p {
    margin: 5px 0 !important;
    color: #856404 !important;
    font-size: 13px !important;
    background: transparent !important;
}

.troubleshooting p:first-child {
    font-weight: 600;
    margin-bottom: 8px;
}

.toast-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.toast-button {
    padding: 10px 16px !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    color: white !important;
    text-decoration: none !important;
    display: inline-block !important;
    text-align: center !important;
}

.toast-button.primary {
    background: #3498db !important;
    color: white !important;
}

.toast-button.primary:hover {
    background: #2980b9 !important;
    color: white !important;
}

.toast-button.secondary {
    background: #95a5a6 !important;
    color: white !important;
}

.toast-button.secondary:hover {
    background: #7f8c8d !important;
    color: white !important;
}

.toast-button.chrome {
    background: #4285f4 !important;
    color: white !important;
}

.toast-button.chrome:hover {
    background: #3367d6 !important;
    color: white !important;
}

.toast-button.retry {
    background: #f39c12 !important;
    color: white !important;
}

.toast-button.retry:hover {
    background: #e67e22 !important;
    color: white !important;
}

/* Samsung browser specific styles */
.permission-guide.samsung {
    border-left: 4px solid #1f8ef1;
}

.permission-guide.samsung h3::before {
    content: "📱 ";
}

/* Samsung continue recording toast */
.samsung-continue {
    background: #e8f5e8 !important;
    border: 2px solid #27ae60 !important;
    max-width: 350px !important;
}

.samsung-continue .toast-content {
    background: #e8f5e8 !important;
    color: #27ae60 !important;
}

.samsung-continue p {
    margin: 8px 0 !important;
    color: #27ae60 !important;
    font-weight: 500 !important;
    text-align: center !important;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    
    .save-toast {
        top: 60px;
        right: 10px;
        left: 10px;
        max-width: none;
        margin: 0 10px;
        text-align: center;
    }
    
    /* Mobile permission guide */
    .permission-guide-toast {
        top: 50% !important;
        transform: translateY(-50%) !important;
        left: 10px !important;
        right: 10px !important;
        max-width: none !important;
    }
    
    .toast-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .toast-button {
        width: 100% !important;
        padding: 12px !important;
        font-size: 15px !important;
        color: white !important;
        border: none !important;
        background-color: inherit !important;
    }
    
    /* 在手機上將主要按鈕放成一行 */
    .permission-guide-toast .toast-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .permission-guide-toast .toast-button.secondary {
        grid-column: 1 / -1;
        margin-top: 5px;
    }
}

