* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(330deg,rgba(20, 89, 60, 1) 0%, rgba(25, 59, 44, 1) 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(330deg,rgb(50, 128, 95) 0%, rgb(25, 99, 67) 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Navegação por anos */
.years-nav {
    display: flex;
    gap: 15px;
    padding: 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    overflow-x: auto;
}

.year-btn {
    padding: 12px 30px;
    background: white;
    border: 2px solid rgba(20, 89, 60, 1);
    color: rgba(20, 89, 60, 1);
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.year-btn:hover {
    background: rgb(7, 51, 33);
    color: white;
    transform: translateY(-2px);
}

.year-btn.active {
    background: rgb(1, 37, 22);
    color: white;
}

/* Conteúdo principal */
.content {
    padding: 30px;
}

/* Navegação por meses */
.months-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
}

.month-btn {
    padding: 10px;
    background: #f0f0f0;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.month-btn:hover:not(:disabled) {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.month-btn.active {
    background: rgba(20, 89, 60, 1);
    color: white;
}

.month-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid rgba(20, 89, 60, 1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Grid de peças */
.pieces-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.piece-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.piece-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.piece-preview {
    width: 100%;
    height: 200px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.piece-preview img,
.piece-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.piece-type {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: bold;
}

.piece-info {
    padding: 15px;
}

.piece-title {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.piece-description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

.download-btn {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(20, 89, 60, 1);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9em;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
}

.download-btn:hover {
    background: rgb(7, 51, 33);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 10px;
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.modal-content img,
.modal-content video {
    width: 100%;
    height: auto;
    max-height: 90vh;
    border-radius: 10px;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
}

/* Responsividade */
@media (max-width: 768px) {
    .years-nav {
        padding: 20px;
    }
    
    .year-btn {
        padding: 8px 20px;
        font-size: 0.9em;
    }
    
    .content {
        padding: 20px;
    }
    
    .pieces-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        text-align: center;
    }
}
