/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Navigation */
nav {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
    justify-content: center;
}

nav li {
    margin: 0;
}

nav a {
    display: block;
    padding: 1rem 2rem;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

nav a:hover {
    color: #4B5CFA;
    background-color: #f8f9fa;
}

nav a.active {
    color: #4B5CFA;
    border-bottom-color: #4B5CFA;
    font-weight: 600;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.container-with-sidebar {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.container-with-sidebar .container {
    flex: 1;
    max-width: 1000px;
    margin-right: 250px;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e1e4e8;
}

h3 {
    font-size: 1.2rem;
    color: #34495e;
    margin-bottom: 0.75rem;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Sections */
.config-section {
    background: #fff;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4B5CFA;
    box-shadow: 0 0 0 3px rgba(75, 92, 250, 0.1);
}

.form-group textarea {
    resize: vertical;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.form-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #e9ecef;
    color: #495057;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-primary {
    background-color: #4B5CFA;
    color: white;
}

.btn-primary:hover {
    background-color: #3a4ad9;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

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

.btn-success:hover {
    background-color: #218838;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    display: block;
    width: 100%;
    margin-bottom: 0.5rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Status Messages */
.status-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
    display: none;
}

.status-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.status-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

/* Status Display */
.status-display {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    border-left: 4px solid #4B5CFA;
}

.status-display p {
    margin: 0.5rem 0;
}

.status-display span {
    font-weight: normal;
    color: #666;
}

/* Message Display Area */
.message-display-area {
    min-height: 200px;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
}

.message-display-area .info-text {
    color: #6c757d;
    margin-bottom: 1rem;
}

.message-display-area ul {
    text-align: left;
    display: inline-block;
    color: #6c757d;
}

/* Test Form Container */
.test-form-container {
    background-color: #f8f9fa;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.test-form {
    margin-top: 1rem;
}

/* Debug Console */
.debug-console {
    background-color: #1e1e1e;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}

.console-header {
    background-color: #2d2d2d;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}

.console-output {
    padding: 1rem;
    min-height: 150px;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    color: #00ff00;
    line-height: 1.4;
}

.console-output .log-entry {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #333;
}

.console-output .log-time {
    color: #888;
    margin-right: 0.5rem;
}

.console-output .log-type {
    color: #4B5CFA;
    font-weight: bold;
    margin-right: 0.5rem;
}

.console-output .log-message {
    color: #fff;
}

/* Test Scenarios */
.test-scenarios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.scenario-card {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.scenario-card h3 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.scenario-card p {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Radio and Checkbox Labels */
.radio-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: normal;
}

.radio-label input {
    margin-right: 0.5rem;
}

/* Scrollbar Styling */
.console-output::-webkit-scrollbar {
    width: 8px;
}

.console-output::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.console-output::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.console-output::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Floating Actions */
.floating-actions {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 220px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 1.5rem;
    z-index: 50;
}

.floating-actions h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: #2c3e50;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e1e4e8;
}

.floating-actions-buttons {
    display: flex;
    flex-direction: column;
}

.floating-actions .btn {
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 1280px) {
    .container-with-sidebar .container {
        margin-right: 240px;
    }
    
    .floating-actions {
        width: 200px;
    }
}

@media (max-width: 1024px) {
    .container-with-sidebar {
        flex-direction: column;
    }
    
    .container-with-sidebar .container {
        margin-right: 0;
        max-width: 100%;
    }
    
    .floating-actions {
        position: static;
        width: 100%;
        margin: 1rem 2rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    .floating-actions-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .floating-actions .btn {
        flex: 1;
        min-width: 150px;
    }
}

/* Loading Indicator */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4B5CFA;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav a {
        padding: 0.75rem 1rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .test-scenarios {
        grid-template-columns: 1fr;
    }
}
