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

:root {
    --primary-color: #0062ff;
    --primary-dark: #0052d4;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 24px 32px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
}

.logo-text h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.logo-text p {
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 500;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s ease;
}

.btn-link:hover {
    color: var(--primary-dark);
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
    flex: 1;
    margin-bottom: 24px;
}

/* Left Panel */
.left-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-section {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
}

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

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-counter {
    font-size: 14px;
    color: var(--gray-500);
}

textarea {
    width: 100%;
    height: 180px;
    padding: 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    resize: none;
    transition: border-color 0.3s ease;
    margin-bottom: 16px;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea::placeholder {
    color: var(--gray-400);
    line-height: 1.5;
}

.input-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.complexity-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

.complexity-selector label {
    font-weight: 500;
    color: var(--gray-700);
}

.complexity-selector select {
    padding: 8px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    background: white;
    cursor: pointer;
}

/* Status Section */
.status-section {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.status-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicators {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.status-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gray-300);
    position: relative;
}

.status-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
}

.status-item.active .status-dot {
    background: var(--success-color);
}

.status-item.active .status-dot::after {
    background: white;
}

.status-item.completed .status-dot {
    background: var(--success-color);
}

.status-item.completed .status-dot::after {
    background: var(--success-color);
    width: 16px;
    height: 16px;
}

.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.execution-time {
    text-align: center;
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 500;
}

/* Right Panel */
.right-panel {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.tabs {
    display: flex;
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
}

.tab {
    flex: 1;
    padding: 18px;
    border: none;
    background: none;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
}

.tab:hover {
    background: var(--gray-200);
}

.tab.active {
    color: var(--primary-color);
    background: white;
    border-bottom: 3px solid var(--primary-color);
}

.tab-content {
    height: 600px;
    overflow-y: auto;
}

.tab-pane {
    display: none;
    height: 100%;
    flex-direction: column;
}

.tab-pane.active {
    display: flex;
}

.tab-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tab-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.empty-state {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    text-align: center;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
    color: var(--gray-500);
}

/* Plan Content */
.step-container {
    margin-bottom: 20px;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px 16px;
    background: var(--gray-100);
    border-radius: var(--border-radius);
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.step-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--gray-800);
    flex: 1;
}

.step-duration {
    font-size: 14px;
    color: var(--gray-600);
    padding: 4px 12px;
    background: var(--gray-200);
    border-radius: 20px;
}

.step-details {
    padding: 0 16px 16px;
}

.step-description {
    margin-bottom: 12px;
    color: var(--gray-700);
    line-height: 1.6;
}

.step-resources {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.resource-tag {
    padding: 4px 12px;
    background: var(--gray-100);
    border-radius: 20px;
    font-size: 13px;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Validation Content */
.validation-item {
    padding: 16px;
    border-radius: var(--border-radius);
    margin-bottom: 12px;
    background: var(--gray-100);
}

.validation-item.passed {
    border-left: 4px solid var(--success-color);
}

.validation-item.warning {
    border-left: 4px solid var(--warning-color);
}

.validation-item.failed {
    border-left: 4px solid var(--danger-color);
}

.validation-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.validation-icon {
    font-size: 18px;
}

.validation-item.passed .validation-icon {
    color: var(--success-color);
}

.validation-item.warning .validation-icon {
    color: var(--warning-color);
}

.validation-item.failed .validation-icon {
    color: var(--danger-color);
}

.validation-title {
    font-weight: 600;
    font-size: 15px;
}

.validation-message {
    color: var(--gray-700);
    font-size: 14px;
    line-height: 1.5;
}

/* Advice Content */
.advice-card {
    padding: 20px;
    background: linear-gradient(135deg, #f6f9ff 0%, #f0f4ff 100%);
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    border: 1px solid var(--gray-200);
}

.advice-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.advice-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.advice-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--gray-800);
}

.advice-content {
    color: var(--gray-700);
    line-height: 1.6;
}

.tips-list {
    margin-top: 12px;
    padding-left: 20px;
}

.tips-list li {
    margin-bottom: 6px;
    color: var(--gray-700);
}

/* Summary Content */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    padding: 20px;
    background: var(--gray-100);
    border-radius: var(--border-radius);
}

.summary-card h4 {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-800);
}

.summary-chart {
    height: 200px;
    background: var(--gray-100);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 24px;
}

.chart-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    font-size: 14px;
}

.summary-recommendations {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    padding: 20px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--warning-color);
}

/* Footer */
.footer {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 20px 32px;
    box-shadow: var(--shadow-md);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ibm-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.footer-text {
    color: var(--gray-600);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 16px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 12px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--gray-600);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-modal:hover {
    background: var(--gray-200);
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    margin-bottom: 20px;
    color: var(--gray-700);
    line-height: 1.6;
}

.features h3, .tech-stack h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 12px;
}

.features ul {
    list-style: none;
    padding-left: 0;
}

.features li {
    padding: 8px 0;
    color: var(--gray-700);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.features li::before {
    content: '✓';
    color: var(--success-color);
    font-weight: bold;
}

.tech-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.tech-icon {
    padding: 8px 16px;
    background: var(--gray-100);
    border-radius: 20px;
    font-size: 14px;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding: 20px;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
    }
    
    .input-actions {
        flex-direction: column;
        gap: 16px;
    }
    
    .complexity-selector {
        width: 100%;
        justify-content: space-between;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab {
        flex: 1 0 calc(50% - 4px);
        padding: 14px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 98, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 98, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 98, 255, 0);
    }
}

.processing .status-dot {
    animation: pulse 2s infinite;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

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

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}
