* {
    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;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 0;
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    color: white;
    text-align: center;
    position: relative;
}

.header-actions {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
}

.logout-btn {
    padding: 8px 16px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

.back-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(-3px);
}

h1 {
    color: white;
    margin-bottom: 10px;
    font-size: 32px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.subtitle {
    color: rgba(255,255,255,0.9);
    margin-bottom: 0;
    font-size: 16px;
    font-weight: 400;
}

.content {
    padding: 40px;
}

.info-box {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.info-box h3 {
    color: #2d3748;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box ul {
    margin-left: 24px;
    color: #4a5568;
    line-height: 2;
    list-style: none;
}

.info-box li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 24px;
}

.info-box li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
    font-size: 16px;
}

.action-section {
    text-align: center;
    padding: 30px 0;
}

.btn {
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover:not(:disabled):before {
    width: 300px;
    height: 300px;
}

.btn:hover:not(:disabled) {
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn span {
    position: relative;
    z-index: 1;
}

.status-container {
    margin-top: 30px;
    padding: 24px;
    border-radius: 12px;
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-container.show {
    display: block;
}

.status-info {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0c4a6e;
    border: 2px solid #7dd3fc;
}

.status-success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #14532d;
    border: 2px solid #86efac;
}

.status-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #7f1d1d;
    border: 2px solid #fca5a5;
}

.status-container h3 {
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 600;
}

.status-container p {
    line-height: 1.8;
    margin-bottom: 8px;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

.stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.stat-card .number {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-card .label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logs-section {
    margin-top: 40px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.logs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.logs-header h3 {
    color: #2d3748;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logs-container {
    background: #1a1a1a;
    color: #d4d4d4;
    padding: 24px;
    border-radius: 12px;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    max-height: 600px;
    overflow-y: auto;
    line-height: 1.8;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.3);
    border: 2px solid #2d2d2d;
}

.logs-container::-webkit-scrollbar {
    width: 8px;
}

.logs-container::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 4px;
}

.logs-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.logs-container::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

.logs-container div {
    padding: 2px 0;
    word-wrap: break-word;
}

/* Phase 1 & 2 Status Indicators */
.phase-status {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.phase-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.phase-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.phase-badge.phase1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.phase-badge.phase2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.status-text {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.status-text.safe {
    color: #4caf50;
}

.status-text.normal {
    color: #2196f3;
}

.status-text.warning {
    color: #ff9800;
}

.status-text.critical {
    color: #f44336;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header {
        padding: 30px 20px;
    }

    h1 {
        font-size: 24px;
    }

    .content {
        padding: 24px;
    }

    .btn {
        padding: 16px 32px;
        font-size: 16px;
        width: 100%;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card .number {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 24px 16px;
    }

    h1 {
        font-size: 20px;
        flex-direction: column;
    }

    .content {
        padding: 20px;
    }

    .stats {
        grid-template-columns: 1fr;
    }
}

