/**
 * ETC Lab Tools Showcase - Styles
 */

:root {
    --illinois-blue: #13294B;
    --illinois-orange: #FF5F05;
    --light-blue: #1e3a5f;
    --light-orange: #ff7f33;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-600: #6c757d;
    --gray-800: #343a40;
    --success: #28a745;
    --info: #17a2b8;
}

/* Main Container */
.etc-tools-showcase {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Controls */
.tools-controls {
    background: var(--gray-100);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid var(--gray-200);
}

/* Search Box */
.tools-search-box {
    position: relative;
    max-width: 500px;
    margin-bottom: 20px;
}

.tools-search-box input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    border: 2px solid var(--gray-300);
    border-radius: 30px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.tools-search-box input:focus {
    outline: none;
    border-color: var(--illinois-orange);
    box-shadow: 0 0 0 3px rgba(255, 95, 5, 0.1);
}

.tools-search-box .search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-600);
    pointer-events: none;
}

/* Filters */
.tools-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid var(--illinois-blue);
    background: white;
    color: var(--illinois-blue);
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

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

.filter-btn.active {
    background: var(--illinois-blue);
    color: white;
}

/* Stats Bar */
.tools-stats {
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--illinois-blue), var(--light-blue));
    color: white;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    gap: 30px;
    align-items: center;
}

.tools-stats .stat {
    font-size: 14px;
}

.tools-stats .stat strong {
    font-size: 18px;
    color: var(--illinois-orange);
}

/* Tools Grid */
.tools-grid {
    display: grid;
    gap: 25px;
}

.tools-grid.columns-2 {
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
}

.tools-grid.columns-3 {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.tools-grid.columns-4 {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Tool Card */
.tool-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 2px solid transparent;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: var(--illinois-orange);
}

/* Tool Thumbnail */
.tool-thumbnail {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--illinois-blue), var(--light-blue));
    overflow: hidden;
    position: relative;
}

.tool-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* If no thumbnail, show icon */
.tool-card:not(:has(.tool-thumbnail)) .tool-content {
    padding-top: 25px;
}

/* Tool Content */
.tool-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Tool Header */
.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tool-type-badge {
    background: var(--illinois-orange);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-version {
    background: var(--gray-200);
    color: var(--gray-700);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

/* Tool Title */
.tool-title {
    color: var(--illinois-blue);
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

/* Tool Description */
.tool-description {
    color: var(--gray-700);
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
    font-size: 14px;
}

.tool-description p {
    margin: 0;
}

/* Tool Authors */
.tool-authors {
    color: var(--gray-600);
    font-size: 13px;
    margin-bottom: 15px;
    padding-top: 10px;
    border-top: 1px solid var(--gray-200);
}

.tool-authors .lab-member {
    color: var(--illinois-orange);
    font-weight: 600;
}

/* Tool Actions */
.tool-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--gray-200);
}

.tool-btn {
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid;
}

.launch-btn {
    background: var(--illinois-blue);
    color: white;
    border-color: var(--illinois-blue);
}

.launch-btn:hover {
    background: var(--light-blue);
    border-color: var(--light-blue);
    transform: translateX(3px);
}

.cite-btn {
    background: white;
    color: var(--illinois-orange);
    border-color: var(--illinois-orange);
}

.cite-btn:hover {
    background: var(--illinois-orange);
    color: white;
}

/* Tool Stats */
.tool-stats {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.click-count {
    color: var(--gray-600);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.click-count::before {
    content: "👁️";
    opacity: 0.6;
}

/* Citation Box */
.tool-citation {
    margin-top: 20px;
    padding: 20px;
    background: var(--gray-100);
    border-radius: 8px;
    border-left: 4px solid var(--illinois-orange);
}

.tool-citation h4 {
    color: var(--illinois-blue);
    margin: 0 0 12px 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.citation-text {
    background: white;
    padding: 15px;
    border-radius: 5px;
    font-family: 'Georgia', serif;
    line-height: 1.8;
    color: var(--gray-800);
    border: 1px solid var(--gray-300);
    margin-bottom: 15px;
    font-size: 14px;
}

.copy-citation {
    background: var(--illinois-blue);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
}

.copy-citation:hover {
    background: var(--light-blue);
}

.copy-citation.copied {
    background: var(--success);
}

/* No Tools Message */
.no-tools {
    text-align: center;
    padding: 80px 20px;
    background: var(--gray-100);
    border-radius: 10px;
    color: var(--gray-600);
    font-size: 18px;
    grid-column: 1 / -1;
}

.no-tools a {
    color: var(--illinois-orange);
    text-decoration: none;
    font-weight: 600;
}

.no-tools a:hover {
    text-decoration: underline;
}

/* Hidden state */
.tool-card.hidden {
    display: none !important;
}

/* Special badges for different tool types */
.tool-type-badge[data-type="quiz"] {
    background: var(--info);
}

.tool-type-badge[data-type="course"] {
    background: var(--success);
}

.tool-type-badge[data-type="calculator"] {
    background: #6f42c1;
}

.tool-type-badge[data-type="tracker"] {
    background: #fd7e14;
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card {
    animation: fadeIn 0.5s ease;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .etc-tools-showcase {
        padding: 10px;
    }
    
    .tools-controls {
        padding: 15px;
    }
    
    .tools-grid,
    .tools-grid.columns-2,
    .tools-grid.columns-3,
    .tools-grid.columns-4 {
        grid-template-columns: 1fr;
    }
    
    .tool-actions {
        flex-wrap: wrap;
    }
    
    .tool-stats {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    
    .tools-filters {
        justify-content: center;
    }
}