/* IQ Code Hub Styles */

/* Hero Section */
.codehub-hero {
    padding: 180px 0 100px;
    background: linear-gradient(135deg, #f5f5f7 0%, #fff 100%);
    text-align: center;
}

.codehub-hero h1 {
    font-size: 64px;
    margin-bottom: 24px;
    color: var(--color-secondary);
    font-family: var(--font-heading);
}

.codehub-hero p {
    font-size: 22px;
    color: #666;
    margin-bottom: 50px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin-top: 60px;
}

.hero-stats .stat-item {
    text-align: center;
}

.hero-stats .stat-item h3 {
    font-size: 48px;
    color: var(--color-primary-dark);
    margin-bottom: 8px;
}

.hero-stats .stat-item p {
    font-size: 16px;
    color: #888;
    margin: 0;
}

/* Filters Section */
.filters-section {
    padding: 40px 0;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}

.filters-container {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 12px 24px;
    border: 2px solid #eee;
    background: #fff;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--color-text);
}

.filter-btn:hover {
    border-color: var(--color-primary);
    background: rgba(245, 208, 32, 0.1);
}

.filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #000;
}

.search-box {
    position: relative;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 20px;
}

.search-box input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border: 2px solid #eee;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(245, 208, 32, 0.1);
}

/* Problems Section */
.problems-section {
    padding: 60px 0 120px;
    background: #ffffff;
    min-height: 600px;
}

.problems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.problem-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    /* Visible border */
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.problem-card:hover {
    border-color: #000000;
    /* Black border on hover */
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.problem-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.problem-title {
    font-size: 22px;
    font-weight: 700;
    color: #000000;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

/* Monochrome Badges */
.difficulty-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
    border: 1px solid #000;
    background: #fff;
    color: #000;
}

/* Optional: Keep difficulty distinction subtle or remove if strictly no color */
.difficulty-badge.easy {
    border-color: #000;
}

.difficulty-badge.medium {
    border-color: #000;
}

.difficulty-badge.hard {
    border-color: #000;
}

.problem-description {
    color: #000000;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
    flex: 1;
}

.problem-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.language-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f5f5f7;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #000000;
}

.language-tag i {
    font-size: 18px;
    /* Icons keep original color via inline style or class, but here we let them inherit or specific class */
}

.solved-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #000;
    /* Black for consistency */
    font-weight: 600;
}

.solved-indicator i {
    font-size: 18px;
    color: #10b981;
    /* Keep checkmark green or make black? User said "logo/icons - original colour", checkmark is an icon */
}

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

.btn-solve {
    flex: 1;
    padding: 16px 28px;
    background: #F5D020;
    /* Brand Yellow */
    color: #000000;
    border: 2px solid #F5D020;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-solve:hover {
    background: #000000;
    color: #F5D020;
    border-color: #000000;
}

.btn-solve i {
    font-size: 18px;
}

/* Responsive */
@media (max-width: 768px) {
    .codehub-hero h1 {
        font-size: 42px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 30px;
    }

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

    .filters-container {
        justify-content: center;
    }
}

/* IDE Page Styles */
.ide-container {
    display: flex;
    height: calc(100vh - 80px);
    margin-top: 80px;
}

.problem-panel {
    width: 40%;
    background: #fff;
    overflow-y: auto;
    border-right: 1px solid #eee;
    padding: 40px;
}

.editor-panel {
    width: 60%;
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
}

.editor-header {
    background: #2d2d2d;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #3e3e3e;
}

.language-selector {
    padding: 8px 16px;
    background: #1e1e1e;
    color: #fff;
    border: 1px solid #3e3e3e;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
}

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

.btn-run,
.btn-submit,
.btn-reset {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-run {
    background: var(--color-primary);
    color: #000;
}

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

.btn-submit {
    background: #10b981;
    color: #fff;
}

.btn-submit:hover {
    background: #059669;
}

.btn-reset {
    background: #6b7280;
    color: #fff;
}

.btn-reset:hover {
    background: #4b5563;
}

#codeEditor {
    flex: 1;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    padding: 20px;
    background: #1e1e1e;
    color: #d4d4d4;
    border: none;
    outline: none;
    resize: none;
}

.output-panel {
    background: #2d2d2d;
    border-top: 1px solid #3e3e3e;
    max-height: 300px;
    overflow-y: auto;
}

.output-header {
    padding: 12px 24px;
    background: #252525;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid #3e3e3e;
}

.output-content {
    padding: 20px 24px;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.8;
}

.test-case {
    background: #1e1e1e;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid #3e3e3e;
}

.test-case.passed {
    border-left-color: #10b981;
}

.test-case.failed {
    border-left-color: #ef4444;
}

.test-case-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.test-case-title {
    font-weight: 600;
    color: #fff;
}

.test-case-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

.test-case-status.passed {
    color: #10b981;
}

.test-case-status.failed {
    color: #ef4444;
}

.test-case-details {
    font-size: 12px;
    color: #9ca3af;
}

.test-case-details div {
    margin-bottom: 6px;
}

.test-case-details strong {
    color: #d4d4d4;
}

@media (max-width: 1024px) {
    .ide-container {
        flex-direction: column;
        height: auto;
    }

    .problem-panel,
    .editor-panel {
        width: 100%;
    }

    .problem-panel {
        max-height: 400px;
    }
}