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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.stages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stage-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stage-card:not(.disabled):hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.stage-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.stage-card h2 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.stage-card p {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover:not(.disabled) {
    background: #5568d3;
}

.btn.disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background: #6b7280;
}

.btn-secondary:hover:not(.disabled) {
    background: #4b5563;
}

.info-box {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.info-box h3 {
    color: #667eea;
    margin-bottom: 15px;
}

#server-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    font-size: 1.5em;
    display: inline-block;
}

.status-indicator.online {
    color: #10b981;
}

.status-indicator.offline {
    color: #ef4444;
}

#status-text {
    font-weight: 500;
}

/* Stage-specific pages */
.stage-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stage-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.stage-header h1 {
    color: #667eea;
    margin-bottom: 10px;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

.test-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.test-section h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.response-box {
    background: #1f2937;
    color: #10b981;
    padding: 15px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    overflow-x: auto;
    margin-top: 15px;
    min-height: 50px;
    white-space: pre-wrap;
}

.error-box {
    background: #fee2e2;
    color: #991b1b;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #374151;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1em;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

