/* Comment Checker Workspace */
.comment-checker-workspace {
    margin-bottom: 2rem;
}

.workspace-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.workspace-main {
    display: flex;
    flex-direction: row;
    min-height: 700px;
}

/* Code Input Section */
.code-input-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-right: 1px solid #e5e7eb;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 200px;
}

.section-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}

.section-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.selector-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: #475569;
    font-weight: 500;
}

.label-icon {
    font-size: 1rem;
}

.label-text {
    white-space: nowrap;
}

.language-selector {
    border: none;
    background: transparent;
    font-size: 0.875rem;
    color: #1e293b;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    outline: none;
    min-width: 120px;
}

.language-selector:hover {
    background: #f8fafc;
    border-radius: 4px;
}

.code-editor-container {
    position: relative;
    flex: 1;
    min-height: 600px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.code-editor {
    width: 100%;
    height: 100%;
    min-height: 600px;
    
    flex: 1;
}

.code-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-icon {
    font-size: 1rem;
    line-height: 1;
}

.btn-text {
    line-height: 1;
}

.primary-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.primary-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.primary-btn:active {
    transform: translateY(0);
}

.secondary-btn {
    background: #ffffff;
    color: #475569;
    border: 1px solid #e5e7eb;
}

.secondary-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Workspace Divider */
.workspace-divider {
    width: 1px;
    background: #e5e7eb;
    flex-shrink: 0;
}

/* Analysis Results Section */
.analysis-results-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 700px;
    background: #ffffff;
    overflow: hidden;
}

.results-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 3rem 2rem;
}

.placeholder-content {
    text-align: center;
    max-width: 400px;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.placeholder-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.75rem 0;
}

.placeholder-text {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

.results-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
    flex-shrink: 0;
}

.results-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.quality-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.quality-badge.excellent {
    background: #dcfce7;
    color: #166534;
}

.quality-badge.good {
    background: #fef3c7;
    color: #92400e;
}

.quality-badge.poor {
    background: #fee2e2;
    color: #991b1b;
}

.badge-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.quality-badge.excellent .badge-icon {
    background: #22c55e;
}

.quality-badge.good .badge-icon {
    background: #f59e0b;
}

.quality-badge.poor .badge-icon {
    background: #ef4444;
}

/* Score Display */
.score-display {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
    padding: 1rem 0;
}

.score-circle {
    position: relative;
    width: 140px;
    height: 140px;
}

.score-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-ring-bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 8;
}

.score-ring-progress {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 1s ease, stroke 0.5s ease;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-number {
    display: block;
    font-size: 2.25rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.score-label {
    display: block;
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.metric-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.metric-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.metric-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
}

.metric-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.metric-details {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.metric-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.metric-detail-label {
    color: #64748b;
}

.metric-detail-value {
    color: #1e293b;
    font-weight: 600;
}

/* Suggestions Panel */
.suggestions-panel {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e5e7eb;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.panel-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.panel-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.suggestion-item:hover {
    background: #fde68a;
    transform: translateX(4px);
}

.suggestion-icon {
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.suggestion-text {
    flex: 1;
    font-size: 0.9375rem;
    color: #92400e;
    line-height: 1.5;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .workspace-main {
        flex-direction: column;
        min-height: auto;
    }

    .code-input-section {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .workspace-divider {
        display: none;
    }

    .analysis-results-section {
        min-height: 500px;
    }

    .section-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .header-content {
        width: 100%;
    }

    .header-controls {
        width: 100%;
    }

    .language-selector-wrapper {
        width: 100%;
        justify-content: space-between;
    }

    .language-selector {
        flex: 1;
    }

    .code-editor-container {
        min-height: 400px;
    }

    .code-editor {
        min-height: 400px;
    }

    .code-actions {
        padding: 0.875rem 1rem;
        flex-wrap: wrap;
    }

    .action-btn {
        flex: 1;
        justify-content: center;
        min-width: 120px;
    }

    .results-content {
        padding: 1.5rem 1rem;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .score-circle {
        width: 120px;
        height: 120px;
    }

    .score-number {
        font-size: 1.75rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .metric-card {
        padding: 1rem;
    }

    .metric-value {
        font-size: 1.75rem;
    }

    .suggestions-panel {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }

    .placeholder-content {
        padding: 0 1rem;
    }

    .placeholder-icon {
        font-size: 3rem;
    }

    .placeholder-title {
        font-size: 1.25rem;
    }

    .placeholder-text {
        font-size: 0.9375rem;
    }
}

@media (max-width: 480px) {
    .workspace-card {
        border-radius: 12px;
    }

    .section-title {
        font-size: 1.125rem;
    }

    .section-subtitle {
        font-size: 0.8125rem;
    }

    .code-editor-container {
        min-height: 350px;
    }

    .code-editor {
        min-height: 350px;
    }

    .code-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }

    .analysis-results-section {
        min-height: 450px;
    }

    .score-circle {
        width: 120px;
        height: 120px;
    }

    .score-number {
        font-size: 1.75rem;
    }

    .results-title {
        font-size: 1.25rem;
    }

    .panel-title {
        font-size: 1.125rem;
    }

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

/* Animation for results appearance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-content {
    animation: fadeInUp 0.4s ease;
}

.metric-card {
    animation: fadeInUp 0.4s ease;
    animation-fill-mode: both;
}

.metric-card:nth-child(1) { animation-delay: 0.1s; }
.metric-card:nth-child(2) { animation-delay: 0.2s; }
.metric-card:nth-child(3) { animation-delay: 0.3s; }
.metric-card:nth-child(4) { animation-delay: 0.4s; }
.metric-card:nth-child(5) { animation-delay: 0.5s; }
.metric-card:nth-child(6) { animation-delay: 0.6s; }
