* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Almarai', sans-serif;
    background: linear-gradient(135deg, #1C2833 0%, #0A141F 100%);
    background-size: 200% 200%;
    animation: gradientAnimation 15s ease infinite;
    color: #EAECEE;
    min-height: 100vh;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.announcement-banner {
    background: linear-gradient(135deg, #FDB913 0%, #E8A21B 100%);
    border-radius: 16px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(253, 185, 19, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(253, 185, 19, 0.4);
    }
    50% {
        box-shadow: 0 15px 40px rgba(253, 185, 19, 0.6);
    }
}

.announcement-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.announcement-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.announcement-text {
    flex: 1;
    color: #1C2833;
    font-size: 1.3rem;
    font-weight: 600;
    min-width: 200px;
}

.announcement-text strong {
    font-weight: 800;
    font-size: 1.4rem;
}

.announcement-btn {
    background: #1C2833;
    color: #FDB913;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(28, 40, 51, 0.3);
    white-space: nowrap;
}

.announcement-btn:hover {
    background: #0A141F;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(28, 40, 51, 0.5);
}

@media (max-width: 768px) {
    .announcement-banner {
        padding: 15px 20px;
    }
    
    .announcement-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .announcement-text {
        font-size: 1.1rem;
    }
    
    .announcement-text strong {
        font-size: 1.2rem;
    }
    
    .announcement-btn {
        width: 100%;
    }
}

header {
    text-align: center;
    margin-bottom: 60px;
}

header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: #FDB913;
    text-shadow: 0 0 20px rgba(253, 185, 19, 0.5), 0 0 40px rgba(253, 185, 19, 0.3);
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.2), 0 0 40px rgba(253, 185, 19, 0.4);
    }
    50% {
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.5), 0 0 60px rgba(255, 195, 74, 0.6), 0 0 80px rgba(253, 185, 19, 0.8);
    }
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.hero-card {
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    border-radius: 20px;
    padding: 20px 25px;
    margin-bottom: 35px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(253, 185, 19, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(253, 185, 19, 0.3);
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(253, 185, 19, 0.2) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.hero-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 6px 12px rgba(253, 185, 19, 0.4));
    animation: float 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.hero-icon img {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #FFC34A 0%, #FDB913 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.hero-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
    max-width: 900px;
    margin: 0 auto 15px;
    position: relative;
    z-index: 1;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.feature {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(253, 185, 19, 0.1) 0%, rgba(255, 195, 74, 0.1) 100%);
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #926C0D;
    transition: all 0.3s ease;
}

.feature:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(253, 185, 19, 0.3);
}

.feature-icon {
    font-size: 1.1rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.toolbar {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-container {
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.1rem;
    border: 2px solid rgba(253, 185, 19, 0.3);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.95);
    color: #1C2833;
    font-family: 'Almarai', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(28, 40, 51, 0.1);
}

.search-input:focus {
    outline: none;
    border-color: #FDB913;
    box-shadow: 0 8px 25px rgba(253, 185, 19, 0.3), 0 0 0 4px rgba(253, 185, 19, 0.1);
    transform: translateY(-2px);
}

.search-input::placeholder {
    color: rgba(28, 40, 51, 0.5);
}

.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 12px 24px;
    border: 2px solid rgba(253, 185, 19, 0.3);
    background: rgba(255, 255, 255, 0.95);
    color: #1C2833;
    border-radius: 50px;
    font-family: 'Almarai', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: linear-gradient(135deg, #FDB913 0%, #FFC34A 100%);
    color: #1C2833;
    border-color: #FDB913;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(253, 185, 19, 0.4);
}

.filter-btn.active {
    background: linear-gradient(135deg, #FDB913 0%, #E8A21B 100%);
    color: #1C2833;
    border-color: #FDB913;
    box-shadow: 0 6px 20px rgba(253, 185, 19, 0.4);
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(253, 185, 19, 0.2);
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 1rem;
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-label strong {
    color: #FDB913;
    font-weight: 700;
}

.card {
    background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
    border: none;
    border-radius: 24px;
    padding: 35px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(28, 40, 51, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1);
    text-align: center;
}

.card.hidden {
    display: none;
}

.card-favorite {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    filter: grayscale(1);
    opacity: 0.4;
}

.card-favorite.active {
    filter: grayscale(0);
    opacity: 1;
    animation: favoritePulse 0.5s ease;
}

.card-favorite:hover {
    transform: scale(1.2) rotate(15deg);
}

@keyframes favoritePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

.card-category {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(253, 185, 19, 0.15);
    color: #926C0D;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #FDB913, #FFC34A, #E8A21B);
    background-size: 400% 100%;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(72, 12, 168, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 25px 60px rgba(253, 185, 19, 0.35), 0 0 60px rgba(255, 195, 74, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.card:hover::before {
    transform: scaleX(1);
    transform-origin: left;
    animation: gradientShift 3s ease infinite;
}

.card:hover::after {
    opacity: 1;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.card-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    display: block;
    filter: drop-shadow(0 8px 16px rgba(253, 185, 19, 0.6));
    transition: all 0.4s ease;
}

.card:hover .card-icon {
    transform: scale(1.15) rotate(8deg);
    filter: drop-shadow(0 12px 24px rgba(253, 185, 19, 0.8)) drop-shadow(0 0 20px rgba(255, 195, 74, 0.6));
}

.card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #FDB913 0%, #E8A21B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card p {
    color: #555;
    line-height: 1.7;
    font-size: 1rem;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #ffffff;
}

.no-results-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #FDB913;
}

.no-results p {
    font-size: 1.1rem;
    opacity: 0.8;
}

.scroll-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #FDB913 0%, #E8A21B 100%);
    color: #1C2833;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(253, 185, 19, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    font-weight: bold;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 12px 35px rgba(253, 185, 19, 0.6);
}

.keyboard-shortcuts {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 15px 50px rgba(28, 40, 51, 0.3);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    max-width: 300px;
}

.keyboard-shortcuts.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.shortcuts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(253, 185, 19, 0.3);
}

.shortcuts-header h4 {
    font-size: 1.1rem;
    color: #1C2833;
    margin: 0;
}

.shortcuts-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #1C2833;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.shortcuts-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #555;
    font-size: 0.95rem;
}

.shortcut-item kbd {
    background: linear-gradient(135deg, #FDB913 0%, #FFC34A 100%);
    color: #1C2833;
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Almarai', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(253, 185, 19, 0.3);
    min-width: 35px;
    text-align: center;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(28, 40, 51, 0.7);
    backdrop-filter: blur(12px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    animation: slideUp 0.4s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 80px rgba(28, 40, 51, 0.4), 0 0 60px rgba(253, 185, 19, 0.4);
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #FDB913 0%, #E8A21B 100%);
    box-shadow: 0 4px 12px rgba(28, 40, 51, 0.3);
}

.modal-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1C2833;
}

.close-btn {
    background: rgba(28, 40, 51, 0.2);
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #1C2833;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(28, 40, 51, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    flex: 1;
    overflow: hidden;
}

#modalFrame {
    width: 100%;
    height: 100%;
}

.footer {
    margin-top: 60px;
    padding: 40px 0 20px;
    border-top: 2px solid rgba(253, 185, 19, 0.5);
}

.footer-content {
    text-align: center;
    color: #ffffff;
}

.footer-school {
    margin-bottom: 20px;
}

.footer-school h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #FDB913;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.footer-school p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.footer-credits {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-credits p {
    color: rgba(255, 255, 255, 0.95);
}

.footer-credits strong {
    font-weight: 700;
    background: linear-gradient(135deg, #FFC34A 0%, #FDB913 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-copyright {
    padding-top: 15px;
    border-top: 1px solid rgba(253, 185, 19, 0.3);
}

.footer-copyright p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translate(-50%, -45%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.fullscreen-btn {
    background: rgba(28, 40, 51, 0.2);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #1C2833;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.fullscreen-btn:hover {
    background: rgba(28, 40, 51, 0.3);
    transform: scale(1.1);
}

.modal.fullscreen {
    padding: 0;
}

.modal.fullscreen .modal-content {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    border-radius: 0;
}

.modal.fullscreen .modal-body {
    height: calc(100vh - 70px);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.2rem;
    }

    .toolbar {
        gap: 15px;
    }

    .filter-buttons {
        gap: 8px;
    }

    .filter-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .stats-bar {
        gap: 15px;
        padding: 15px;
    }

    .stat-item {
        font-size: 0.9rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .modal-content {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .card {
        padding: 25px;
    }

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

    .scroll-top {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
    }

    .keyboard-shortcuts {
        bottom: 20px;
        right: 20px;
        max-width: 260px;
        padding: 15px;
    }
}