/* Base Reset & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: #f8fafc;
    color: #0f172a;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.hero h1 span {
    color: #60a5fa; /* A nice blue highlight */
}

.hero p {
    font-size: 1.2rem;
    color: #94a3b8;
    line-height: 1.6;
}

/* Main Container & Grid */
[hidden] { display: none !important; }
.workspace-toggle { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.workspace-toggle button { padding: 12px 20px; border: 1px solid #94a3b8; border-radius: 9px; background: #fff; color: #172554; font-size: 1rem; font-weight: 700; cursor: pointer; }
.workspace-toggle button[aria-pressed="true"] { background: #172554; color: #fff; }
.workspace-toggle button:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }
.container {
    flex: 1;
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 30px;
}

/* Teacher tool cards sit five across so every app is visible at a glance */
#teacherTools {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

/* Tool Cards */
.tool-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tool-card:hover:not(.disabled) {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
}

.tool-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.tool-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tool-info h2 {
    font-size: 1.4rem;
    color: #1e293b;
    margin-bottom: 10px;
}

.tool-info p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 25px;
    flex: 1;
}

/* Launch Button */
.btn-launch {
    display: inline-block;
    background-color: #eff6ff;
    color: #3b82f6;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 8px;
    text-align: center;
    transition: background-color 0.2s;
    align-self: flex-start;
}

.tool-card:hover:not(.disabled) .btn-launch {
    background-color: #3b82f6;
    color: #ffffff;
}

/* Disabled/Coming Soon State */
.tool-card.disabled {
    cursor: default;
    opacity: 0.8;
}

.btn-launch.coming-soon {
    background-color: #f1f5f9;
    color: #94a3b8;
}

/* Compact teacher cards for the five-across layout */
#teacherTools .tool-card {
    min-width: 0;
    padding: 18px;
    border-radius: 14px;
}

#teacherTools .tool-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    font-size: 1.35rem;
    margin-bottom: 14px;
}

#teacherTools .tool-info h2 {
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 8px;
    overflow-wrap: break-word;
}

#teacherTools .tool-info p {
    font-size: 0.82rem;
    line-height: 1.45;
    margin-bottom: 16px;
}

#teacherTools .btn-launch {
    width: 100%;
    padding: 9px 10px;
    font-size: 0.82rem;
}

@media (max-width: 1000px) {
    #teacherTools {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    #teacherTools {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    #teacherTools {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #94a3b8;
    font-size: 0.9rem;
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
}

footer .legal-links {
    margin-top: 8px;
}

footer .legal-links a {
    color: #64748b;
    text-decoration: none;
}

footer .legal-links a:hover {
    color: #2563eb;
    text-decoration: underline;
}
