
        body { 
            font-family: Arial, sans-serif; 
            margin: 20px; 
            line-height: 1.6; 
        }
        
        #output { 
            margin-top: 20px; 
            padding: 15px; 
            border: 1px solid #ccc; 
            background: #f9f9f9; 
            border-radius: 5px;
        }
        
        .result { 
            margin: 15px 0; 
            padding: 10px;
            background: white;
            border-left: 4px solid #007cba;
            border-radius: 3px;
        }
        
        .controls {
            margin: 20px 0;
            padding: 15px;
            background: #f0f0f0;
            border-radius: 5px;
        }
        
        button {
            background: #007cba;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 3px;
            cursor: pointer;
            margin-right: 10px;
        }
        
        button:hover {
            background: #005a87;
        }
        
        button:disabled {
            background: #ccc;
            cursor: not-allowed;
        }
        
        .info-box {
            background: #e7f3ff;
            border: 1px solid #b3d9ff;
            padding: 15px;
            border-radius: 5px;
            margin: 15px 0;
        }
        
        .error {
            color: #d32f2f;
            background: #ffebee;
            border: 1px solid #f8bbd9;
            padding: 10px;
            border-radius: 3px;
        }
        
        .success {
            color: #2e7d32;
            background: #e8f5e8;
            border: 1px solid #c8e6c9;
            padding: 10px;
            border-radius: 3px;
        }
        
        .spreadsheet-container {
            margin: 20px 0;
            border: 1px solid #ddd;
            border-radius: 5px;
            overflow: hidden;
        }
        
        .spreadsheet-header {
            background: #f5f5f5;
            padding: 10px;
            border-bottom: 1px solid #ddd;
            font-weight: bold;
        }
        
        .spreadsheet-wrapper {
            height: 400px;
            width: 100%;
            border: 1px solid #ddd;
            border-radius: 3px;
            overflow: auto;
            position: relative;
        }
        
        .spreadsheet-controls {
            padding: 10px;
            background: #f8f9fa;
            border-bottom: 1px solid #ddd;
            display: flex;
            align-items: center;
            gap: 15px;
            font-size: 14px;
        }
        
        .row-counter {
            font-weight: bold;
            color: #007cba;
        }
        
        .view-controls button {
            padding: 5px 10px;
            font-size: 12px;
            background: #6c757d;
            color: white;
            border: none;
            border-radius: 3px;
            cursor: pointer;
            margin-right: 5px;
        }
        
        .view-controls button:hover {
            background: #5a6268;
        }
        
        #precipitation-spreadsheet, #results-spreadsheet {
            width: 100%;
            max-height: none;
        }
        
        .tabs {
            display: flex;
            background: #e0e0e0;
            border-bottom: 1px solid #ddd;
            margin: 20px 0 0 0;
        }
        
        .tab {
            padding: 10px 20px;
            cursor: pointer;
            border: none;
            background: #e0e0e0;
            color: #333;
            border-bottom: 3px solid transparent;
            font-weight: 500;
            transition: all 0.3s ease;
        }
        
        .tab:hover {
            background: #d0d0d0;
            color: #000;
        }
        
        .tab.active {
            background: #007cba;
            color: white;
            border-bottom: 3px solid #005a87;
            font-weight: bold;
        }
        
        .tab-content {
            display: none;
            padding: 20px;
            background: white;
            border: 1px solid #ddd;
            border-top: none;
        }
        
        .tab-content.active {
            display: block;
        }
        
        .data-controls {
            margin: 10px 0;
            padding: 10px;
            background: #f9f9f9;
            border-radius: 3px;
        }
        
        .data-controls button {
            margin-right: 10px;
            margin-bottom: 5px;
        }
        
        .export-controls {
            margin-top: 15px;
            padding: 10px;
            background: #f0f8ff;
            border-radius: 3px;
        }
        
        /* Table styles for editable spreadsheet */
        .editable-table {
            border-collapse: collapse;
            width: 100%;
            font-family: Arial, sans-serif;
            font-size: 14px;
            background: white;
        }
        
        .editable-table th, .editable-table td {
            border: 1px solid #ddd;
            padding: 8px;
            text-align: left;
        }
        
        .editable-table th {
            background-color: #f0f0f0;
            font-weight: bold;
            position: sticky;
            top: 0;
            z-index: 10;
        }
        
        .editable-table tr:nth-child(even) {
            background-color: #f9f9f9;
        }
        
        .editable-table tr:hover {
            background-color: #f5f5f5;
        }
        
        .editable-table input {
            border: none;
            background: transparent;
            width: 100%;
            padding: 4px;
            font-family: inherit;
            font-size: inherit;
        }
        
        .editable-table input:focus {
            background-color: #fff;
            outline: 2px solid #007cba;
            border-radius: 2px;
        }
        
        /* Results table specific styling */
        #results-spreadsheet tbody tr {
            transition: background-color 0.2s ease;
        }
        
        /* Row number styling */
        .editable-table td:first-child {
            background: #f8f9fa !important;
            font-weight: bold;
            text-align: center;
            color: #6c757d;
            width: 60px;
            min-width: 60px;
        }