body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f7;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.site-logo {
    max-height: 80px;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.header h1 {
    margin-bottom: 5px;
    color: #2c3e50;
}

.header p {
    font-size: 16px;
    color: #7f8c8d;
}

/* Main side-by-side section */
.main-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

/* Responsive side-by-side layout for larger screens */
@media (min-width: 992px) {
    .main-section {
        flex-direction: row;
    }
    
    .visual-auras-panel {
        width: 45%; 
        overflow-y: auto;
        max-height: 650px;
    }
    
    .visualization-panel {
        width: 55%;
    }
}

/* Visual Auras Panel */
.visual-auras-panel {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    max-height: none;
    overflow-y: visible;
}

.visual-auras-panel h2 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
}

.visual-auras-panel .instructions {
    color: #7f8c8d;
    font-size: 15px;
    margin-bottom: 20px;
}

.visual-aura-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

/* Visualization Panel */
.visualization-panel {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    position: relative;
    width: 100%;
}

.visualization-panel h2 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
}

.canvas-container {
    max-width: 640px;
    margin: 0 auto;
    display: block;
    background-color: #000;
    overflow: hidden;
    border-radius: 8px;
}

.canvas-container canvas {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Older canvas styling for backward compatibility */
canvas {
    display: block;
    border-radius: 5px;
    background-color: #000;
    touch-action: manipulation;
}

@media (min-width: 768px) {
    canvas {
        height: auto;
    }
}

.filter-controls {
    margin-top: 15px;
    text-align: center;
}

.filter-controls p {
    font-size: 15px;
    color: #7f8c8d;
    margin: 10px 0;
}

/* Additional Section (below main section) */
.additional-section {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 30px;
}

.additional-section h2 {
    color: #2c3e50;
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.additional-section h3 {
    margin: 20px 0 10px;
    color: #3498db;
    font-size: 18px;
}

/* Symptom Items */
.symptom-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.symptom-item label {
    display: inline-block;
    margin-left: 5px;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Eye button styles */
.visualize-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    vertical-align: middle;
    margin-left: 8px;
    opacity: 0.7;
    transition: all 0.2s ease;
    padding: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.visualize-btn:hover {
    opacity: 1;
    background-color: #f0f8ff;
    transform: scale(1.1);
}

.visualize-btn.active {
    opacity: 1;
    background-color: #e3f2fd;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
    position: relative;
}

/* Add a small badge indicator for active filters */
.visualize-btn.active::after {
    content: "✓";
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: #3498db;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Clear filters button */
.clear-filters-btn {
    margin-top: 15px;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #555;
    display: inline-block;
}

.clear-filters-btn:hover {
    background-color: #e0e0e0;
    border-color: #ccc;
}

/* Multiple active filters message styling */
#current-visualization {
    font-size: 15px;
    color: #3498db;
    font-weight: 500;
    margin: 10px 0;
    min-height: 20px;
    transition: all 0.3s ease;
}

.severity-slider {
    width: 100%;
    margin-top: 8px;
    margin-left: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.severity-slider label {
    font-size: 14px;
    font-weight: normal;
    color: #7f8c8d;
    flex: 0 0 auto;
}

.severity-slider input[type="range"] {
    flex: 1;
    height: 10px;
    min-width: 100px;
    max-width: 100%;
}

.severity-value {
    font-weight: bold;
    color: #3498db;
}

/* Other symptom grid */
@media (min-width: 768px) {
    .symptom-group {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
        gap: 20px;
    }
}

.pattern-group {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .pattern-group {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
}

.report-actions {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.primary-button, .secondary-button {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.primary-button:hover {
    background-color: #2980b9;
}

.secondary-button {
    background-color: #ecf0f1;
    color: #34495e;
}

.secondary-button:hover {
    background-color: #dce4e8;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 50;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    position: relative;
}

.close-button {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #777;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    background-color: #f1f1f1;
    transition: all 0.2s ease;
}

.close-button:hover {
    background-color: #e0e0e0;
    color: #333;
}

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

#report-content {
    margin: 15px 0;
}

#report-preview {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    margin: 15px 0;
}

/* Mobile visualization modal styles */
.visualization-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    width: 95%;
    max-width: 400px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-canvas-container {
    width: 100%;
    margin: 0 auto 15px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: relative;
    background: linear-gradient(to bottom right, #1a1a2e, #16213e);
}

.mobile-canvas-container canvas {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

#mobile-visualization-title {
    text-align: center;
    color: #3498db;
    margin-top: 10px;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.modal-actions {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.modal-actions button {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    background-color: #f1f1f1;
    color: #333;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.modal-actions button:hover {
    background-color: #e0e0e0;
}

@media (max-width: 768px) {
    .main-section {
        flex-direction: column;
    }
    
    .visual-auras-panel, .visualization-panel {
        width: 100%;
        max-height: none;
    }
    
    .visualization-panel {
        padding: 15px;
    }
    
    .canvas-container {
        max-width: 100%;
        margin: 0 auto;
        border-radius: 8px;
    }
    
    .canvas-container canvas {
        width: 100%;
        height: auto;
    }
    
    .symptom-item {
        padding: 10px 0;
    }
    
    .symptom-item label {
        font-size: 14px;
    }
    
    .severity-slider {
        width: 100%;
        margin-top: 8px;
    }
    
    .severity-slider input[type="range"] {
        width: 60%;
    }
    
    .visualize-btn {
        font-size: 18px;
    }
    
    .site-logo {
        max-height: 60px;
        margin-bottom: 10px;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 15px;
    }
    
    #report-preview {
        padding: 10px;
    }
    
    .mobile-canvas-container {
        width: 100%;
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    #mobile-visualization-title {
        margin-top: 0;
        margin-bottom: 10px;
        padding-right: 30px;
    }
    
    .visualization-modal-content .close-button {
        top: 10px;
        right: 10px;
        background-color: rgba(0,0,0,0.1);
        color: #333;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        z-index: 10;
    }
    
    .modal-actions button {
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .header p {
        font-size: 14px;
    }

    select, 
    textarea, 
    input[type="range"] {
        font-size: 16px;
    }

    .additional-section {
        padding: 15px;
    }

    .additional-section h2 {
        font-size: 20px;
    }

    .additional-section h3 {
        font-size: 16px;
    }

    .other-symptoms,
    .migraine-pattern,
    .notes-section {
        margin-bottom: 20px;
    }

    input[type="checkbox"] {
        width: 22px;
        height: 22px;
        margin-right: 5px;
        vertical-align: middle;
    }

    #visualization-modal.modal {
        background-color: rgba(0, 0, 0, 0.9);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .visual-auras-panel, .visualization-panel {
        padding: 15px;
    }
    
    .visualize-btn {
        margin-left: 4px;
    }
    
    .report-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .report-actions button {
        width: 100%;
    }

    .symptom-group {
        display: block;
    }

    .additional-section h2 {
        padding-bottom: 8px;
        margin-bottom: 10px;
    }

    .form-group select {
        height: 40px;
        margin-bottom: 5px;
    }

    textarea {
        min-height: 80px;
    }

    .severity-slider label {
        width: 100%;
        margin-bottom: 3px;
    }
}

@media (pointer: coarse) {
    .visualize-btn, 
    input[type="checkbox"],
    .severity-slider input[type="range"],
    .report-actions button,
    select,
    .form-group label,
    .pain-avatar-view-btn,
    .pain-avatar-intensity-btn,
    .pain-avatar-tool-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    button:active,
    select:active,
    input[type="checkbox"]:active {
        transform: scale(0.98);
    }
    
    button:active {
        opacity: 0.8;
    }
}

@media (min-width: 769px) {
    #visualization-modal {
        display: none !important;
    }
}

/* Adjust canvas size for mobile devices */
@media (max-width: 768px) {
    .canvas-container {
        max-width: 100%;
    }
} 