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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

h1 {
    font-size: 24px;
    color: #333;
}

h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
}

button, .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s;
}

button:hover:not(:disabled), .btn:hover {
    opacity: 0.9;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #000;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

label {
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #555;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #007bff;
}

input[type="range"] {
    width: 100%;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.upload-slot {
    border: 2px dashed #ccc;
    padding: 20px;
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.upload-slot:hover {
    border-color: #007bff;
    background: #f8f9fa;
}

.upload-slot.has-file {
    border-color: #28a745;
    border-style: solid;
    background: #f0f9f4;
}

.file-input {
    display: none;
}

.upload-label {
    cursor: pointer;
    color: #007bff;
    font-size: 14px;
}

.file-name {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    word-break: break-all;
}

.remove-file {
    margin-top: 8px;
    padding: 4px 8px;
    font-size: 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.graph-list {
    list-style: none;
}

.graph-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    background: #fafafa;
    transition: background 0.2s;
}

.graph-item:hover {
    background: #f0f0f0;
}

.graph-info-wrapper {
    flex: 1;
}

.graph-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.graph-info {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

.error {
    color: #721c24;
    padding: 12px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 15px;
}

.success {
    color: #155724;
    padding: 12px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 15px;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 10px;
}

.login-container h2 {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

table tr:hover {
    background: #f8f9fa;
}

.hidden {
    display: none;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }

#graph-container {
    width: 100%;
    height: 600px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #000;
}

.graph-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-value {
    min-width: 50px;
    font-weight: 600;
}
