:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --background-color: #f5f6fa;
    --card-color: #fff;
    --gradient-start: #3498db;
    --gradient-end: #2980b9;
}

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

body {
    font-family: 'Special Elite', cursive;
    line-height: 1.8;
    background: linear-gradient(rgba(245, 246, 250, 0.8), rgba(223, 228, 234, 0.8)),
                url('time.jpg') no-repeat center center fixed;
    background-size: cover;
    padding: 20px;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-color);
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
}

header h1 {
    margin-bottom: 15px;
    font-size: 2.8rem;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

header p {
    font-size: 1.3rem;
    color: #666;
}

nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.filter-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Special Elite', cursive;
    font-size: 1.1rem;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.filter-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--accent-color), #c0392b);
    transform: scale(1.1);
}

#activities-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.activity-card {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.activity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
}

.activity-card.color-1 {
    background: linear-gradient(135deg, #ffffff 0%, #e8f6ff 100%);
}

.activity-card.color-2 {
    background: linear-gradient(135deg, #ffffff 0%, #fff0f0 100%);
}

.activity-card.color-3 {
    background: linear-gradient(135deg, #ffffff 0%, #f0fff0 100%);
}

.activity-card.color-4 {
    background: linear-gradient(135deg, #ffffff 0%, #fff0ff 100%);
}

.activity-card.color-5 {
    background: linear-gradient(135deg, #ffffff 0%, #fffff0 100%);
}

.activity-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    background-blend-mode: soft-light;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 15px;
}

.activity-title {
    color: var(--primary-color);
    font-size: 1.8rem;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.duration-badge {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 1rem;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.activity-content h3 {
    color: var(--primary-color);
    margin: 20px 0 10px 0;
    font-size: 1.4rem;
    letter-spacing: 1px;
    position: relative;
    padding-left: 20px;
}

.activity-content h3::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.activity-content p {
    color: #444;
    font-size: 1.1rem;
    margin-bottom: 15px;
    line-height: 1.8;
    padding: 10px;
    background: rgba(236, 240, 241, 0.5);
    border-radius: 8px;
}

.activity-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.activity-card:hover .activity-image {
    transform: scale(1.05);
}

.activity-expanded .activity-image {
    height: 300px;
    margin: 30px 0;
}

.activity-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.activity-expanded {
    background: white;
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px;
    border-radius: 20px;
    position: relative;
    animation: expandIn 0.3s ease-out;
}

.close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-button:hover {
    transform: scale(1.1);
    background: #c0392b;
}

.activity-expanded .activity-content {
    font-size: 1.2rem;
}

.activity-expanded .activity-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

@keyframes expandIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.activity-expanded .activity-content p {
    font-size: 1.3rem;
    line-height: 2;
    margin-bottom: 25px;
}

.activity-expanded .activity-header {
    margin-bottom: 40px;
}

.action-buttons {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.download-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Special Elite', cursive;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.download-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

@media print {
    body * {
        visibility: hidden;
    }
    
    .activity-expanded, .activity-expanded * {
        visibility: visible;
    }
    
    .activity-expanded {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: none;
    }
    
    .close-button, .action-buttons {
        display: none !important;
    }
}

.print-template {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background: white;
    display: none;
}

.print-template.show {
    display: block;
}

@media (max-width: 600px) {
    body {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .activity-title {
        font-size: 1.4rem;
    }
    
    .activity-content p {
        font-size: 1rem;
    }
}

.activity-expanded {
    max-width: 800px !important;
    font-size: 12px !important;
}

@media print {
    .activity-expanded {
        padding: 20px !important;
        margin: 0 !important;
        width: 100% !important;
        font-size: 11pt !important;
    }

    .activity-expanded .activity-title {
        font-size: 18pt !important;
        margin-bottom: 15px !important;
    }

    .activity-expanded .activity-image {
        height: 150px !important;
        margin: 10px 0 !important;
    }

    .activity-expanded .activity-content h3 {
        font-size: 14pt !important;
        margin: 10px 0 5px 0 !important;
    }

    .activity-expanded .activity-content p {
        font-size: 11pt !important;
        line-height: 1.4 !important;
        margin-bottom: 10px !important;
    }

    .activity-expanded .duration-badge {
        font-size: 11pt !important;
    }
}