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

header, main, footer {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 40px 20px;
    background-color: #2c3e50;
    color: white;
}

h1, h2, h3 {
    margin-top: 0;
    color: #2c3e50;
}

header h1 {
    color: white;
    margin-bottom: 10px;
}

section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
}

/* File upload styles */
.file-input {
    margin: 20px 0;
}

.file-input input[type="file"] {
    display: none;
}

.file-input label {
    display: inline-block;
    padding: 12px 24px;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.file-input label:hover {
    background-color: #2980b9;
}

#file-name {
    margin-left: 10px;
    color: #666;
}

/* S3 Key Input Styles */
.input-group {
    margin: 20px 0;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
}

.input-group input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.input-group small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 14px;
}

/* Panel Selection Styles */
.panel-selection {
    margin: 30px 0;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #eee;
}

.panel-selection h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

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

.checkbox-item input[type="checkbox"] {
    margin-right: 8px;
}

#panel-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.panel-option {
    display: flex;
    align-items: center;
}

.panel-option input[type="checkbox"] {
    margin-right: 8px;
}

#submit-btn, #reset-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 30px auto 0;
    padding: 12px 24px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#submit-btn:hover, #reset-btn:hover {
    background-color: #27ae60;
}

#reset-btn {
    background-color: #3498db;
}

#reset-btn:hover {
    background-color: #2980b9;
}

/* Processing status styles */
#processing-status {
    text-align: center;
}

.progress-container {
    height: 20px;
    background-color: #f1f1f1;
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0;
    background-color: #4CAF50;
    transition: width 0.3s;
}

/* Results styles */
.panel-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
    overflow-x: auto;
}

.panel-tab {
    padding: 10px 20px;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.panel-tab.active {
    border-bottom-color: #3498db;
    color: #3498db;
    font-weight: bold;
}

.trait-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.trait-name {
    margin-top: 0;
    color: #2c3e50;
}

.trait-score {
    display: flex;
    align-items: center;
    margin: 15px 0;
}

.score-bar {
    flex-grow: 1;
    height: 20px;
    background-color: #f1f1f1;
    border-radius: 10px;
    margin: 0 15px;
    position: relative;
    overflow: hidden;
}

.score-value {
    height: 100%;
    background: linear-gradient(to right, #2ecc71, #f1c40f, #e74c3c);
    border-radius: 10px;
    transition: width 0.5s;
}

.score-marker {
    position: absolute;
    top: -5px;
    width: 4px;
    height: 30px;
    background-color: #2c3e50;
    transform: translateX(-50%);
}

.percentile-text {
    font-weight: bold;
    color: #2c3e50;
}

.trait-description {
    color: #666;
    margin-bottom: 0;
}

/* Utility classes */
.hidden {
    display: none;
}

.loading {
    opacity: 0.6;
}

.error {
    color: #e74c3c;
}

footer {
    text-align: center;
    color: #7f8c8d;
    font-size: 14px;
    margin-top: 40px;
}

/* Share URL styles */
.share-container {
    background-color: #f0f7ff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    border-left: 4px solid #3498db;
}

.share-container h3 {
    margin-top: 0;
    color: #2c3e50;
}

.share-url {
    display: flex;
    margin-top: 15px;
}

.share-url input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.share-url button {
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .panel-option {
        grid-template-columns: 1fr;
    }
    
    .trait-score {
        flex-direction: column;
    }
    
    .score-bar {
        width: 100%;
        margin: 10px 0;
    }
}