* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Login Page */
.login-box {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

/* Header */
header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #333;
    font-size: 24px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
}

.form-hint {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
}

.url-input {
    width: 100%;
    max-width: 500px;
}

.form-group textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Home Page */
.home-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.db-actions {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.db-actions h2,
.features h2 {
    color: #333;
    margin-bottom: 20px;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.status-message {
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    display: none;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Feature Cards */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.card h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.card p {
    opacity: 0.9;
}

/* Tables */
.table-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f8f9fa;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    font-weight: 600;
    color: #333;
}

tbody tr:hover {
    background: #f8f9fa;
}

.loading {
    text-align: center;
    color: #6c757d;
    padding: 20px;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.action-buttons .btn {
    padding: 5px 10px;
    font-size: 12px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

/* Error Message */
.error-message {
    color: #dc3545;
    margin-top: 10px;
    padding: 10px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Script Preview */
.script-preview {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-word;
    max-width: 400px;
    margin: 0;
    padding: 5px;
    background: #f8f9fa;
    border-radius: 3px;
}

/* URL Result */
.url-result {
    margin-top: 20px;
}

.url-result-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-top: 15px;
}

.url-result-box h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.url-display {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.url-input-display {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    background: white;
    cursor: text;
}

.url-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.url-info {
    padding: 10px;
    background: #e7f3ff;
    border-left: 4px solid #2196F3;
    border-radius: 4px;
    color: #1976D2;
}

.url-info small {
    font-size: 13px;
    line-height: 1.5;
}

/* JSON Preview Modal */
.json-preview-content {
    background: #282c34;
    color: #abb2bf;
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre;
    word-wrap: normal;
}

