:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #64748b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.fe-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.fe-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    height: 70px;
    display: flex;
    align-items: center;
}

.fe-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.fe-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fe-date {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Hero */
.fe-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.fe-hero-title {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    font-weight: 800;
}

.fe-hero-subtitle {
    margin: 0 0 2rem 0;
    font-size: 1.125rem;
    opacity: 0.9;
}

.fe-search-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.fe-search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border-radius: 999px;
    border: none;
    font-size: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    outline: none;
}

.fe-search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Main */
.fe-main {
    flex-grow: 1;
    padding: 3rem 0;
}

/* Breadcrumb */
.fe-breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.fe-breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.fe-breadcrumb span {
    margin: 0 0.5rem;
    color: #cbd5e1;
}

/* Grid System */
.fe-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .fe-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.fe-card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;

    /* Animation Initial State */
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.2s ease-in-out, opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fe-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.fe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
}

.fe-card-icon {
    width: 8rem;
    height: 8rem;
    background: #eff6ff;
    color: var(--primary);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    transition: background 0.2s;
}

.fe-card:hover .fe-card-icon {
    background: var(--primary);
    color: white;
}

.fe-card-title {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    line-height: 1.4;
}

.fe-card-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fe-icon-external {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    color: #cbd5e1;
}

/* Footer */
.fe-footer {
    padding: 2rem 0;
    background: white;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Empty State */
.fe-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

/* Header Search */
.fe-header .fe-search-wrapper {
    margin: 0 2rem;
    flex-grow: 1;
    max-width: 500px;
}

.fe-header .fe-search-input {
    background: #f1f5f9;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    font-size: 0.9rem;
    box-shadow: none;
    border: 1px solid #e2e8f0;
}

.fe-header .fe-search-input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.fe-header .fe-search-icon {
    left: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Responsive Header */
@media (max-width: 768px) {
    .fe-header {
        height: auto;
        padding: 1rem 0;
    }

    .fe-header-inner {
        flex-direction: column;
        gap: 1rem;
    }

    .fe-logo {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .fe-search-wrapper {
        margin: 0;
        width: 100%;
        max-width: 100%;
        order: 2;
    }

    .fe-date,
    .fe-date-footer {
        display: none;
    }
}

/* Footer Date */
.fe-date-footer {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Floating Buttons */
.fe-floating-btn {
    position: fixed;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.2s;
    opacity: 0.9;
}

.fe-floating-btn:hover {
    transform: translateY(-2px);
    opacity: 1;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
}

.fe-scroll-top {
    bottom: 2rem;
    right: 2rem;
    display: none;
    /* Hidden by default */
}

.fe-accessibility-btn {
    bottom: 2rem;
    left: 2rem;
    background: var(--secondary);
}

/* Accessibility Menu */
.fe-access-menu {
    position: fixed;
    bottom: 6rem;
    left: 2rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 0.5rem 0;
    display: none;
    flex-direction: column;
    z-index: 1001;
    min-width: 200px;
    border: 1px solid var(--border-color);
}

.fe-access-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
    transition: background 0.1s;
    font-size: 0.9rem;
}

.fe-access-item:hover {
    background: #f1f5f9;
}

.fe-access-menu.active {
    display: flex;
}

/* High Contrast Mode */
body.high-contrast {
    background: #000;
    color: #fff;
    --primary: #fbbf24;
    --text-main: #fff;
    --text-muted: #d1d5db;
    --card-bg: #1f2937;
    --border-color: #374151;
    --bg-color: #000;
}

body.high-contrast .fe-header,
body.high-contrast .fe-footer,
body.high-contrast .fe-access-menu {
    background: #111;
    border-color: #333;
}

body.high-contrast .fe-card {
    background: #1f2937;
    border-color: #fbbf24;
}

body.high-contrast a {
    color: #fbbf24;
}

/* Monochrome Mode */
body.monochrome {
    filter: grayscale(100%);
}

/* Highlight Links Mode */
body.highlight-links a {
    text-decoration: underline !important;
    background-color: yellow !important;
    color: black !important;
    font-weight: bold;
}