/* Custom CSS for Fundacja Serce Mototrasy */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom background pattern */
.bg-pattern {
    background-image: 
        radial-gradient(circle at 25% 25%, #DC2626 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, #F97316 2px, transparent 2px);
    background-size: 100px 100px;
    background-position: 0 0, 50px 50px;
}

/* Navigation styles */
.nav-link {
    @apply text-text-gray hover:text-heart-red transition-colors duration-300 font-medium px-2 py-2 rounded-md;
    font-size: 0.875rem; /* 14px - smaller font size to fit "Garaż Mototrasy" in one line */
    white-space: nowrap; /* Prevent text wrapping */
}

.nav-link:hover {
    @apply bg-gray-50;
}

.mobile-nav-link {
    @apply block px-3 py-2 text-text-gray hover:text-heart-red hover:bg-gray-50 transition-colors duration-300;
    white-space: nowrap; /* Prevent text wrapping */
}

/* Hero section animations */
.typing-text {
    overflow: hidden;
    border-right: 3px solid #DC2626;
    white-space: nowrap;
    animation: typing 2s steps(20, end) 2s both, blink-caret 1s step-end infinite 2s;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #DC2626; }
}

/* CTA Button animations */
.cta-button {
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

/* Pulse animation for donate button */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

/* Progress bar animation */
.progress-bar {
    transition: width 2s ease-in-out;
}

/* Counter animation */
.counter {
    transition: all 0.3s ease;
}

/* Gallery hover effects */
.gallery-item {
    cursor: pointer;
}

/* Universal card hover effects - Ujednolicone animacje dla wszystkich kafelków */
.card-hover, 
.bg-white.rounded-xl, 
.bg-white.rounded-lg, 
.bg-white.rounded-2xl,
.bg-gray-50.rounded-xl,
.bg-gray-50.rounded-lg,
.bg-gray-50.rounded-2xl,
.partner-item img,
.action-card,
.bg-gradient-to-br,
.bg-gradient-to-r {
    transition: all 0.5s ease;
    cursor: pointer;
}

/* Hover effects for white/gray background cards */
.card-hover:hover,
.bg-white.rounded-xl:hover,
.bg-white.rounded-lg:hover,
.bg-white.rounded-2xl:hover,
.bg-gray-50.rounded-xl:hover,
.bg-gray-50.rounded-lg:hover,
.bg-gray-50.rounded-2xl:hover,
.action-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12), 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: rgba(220, 38, 38, 0.1);
}

/* Gradient cards hover effect */
.bg-gradient-to-br:hover,
.bg-gradient-to-r:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 12px 24px rgba(0, 0, 0, 0.1);
    filter: brightness(1.05) saturate(1.05);
}

/* Special hover effect for colored gradient cards */
.bg-gradient-to-br.from-heart-red\/10:hover {
    box-shadow: 0 25px 50px rgba(220, 38, 38, 0.2), 0 12px 24px rgba(220, 38, 38, 0.1);
}

.bg-gradient-to-br.from-hope-green\/10:hover {
    box-shadow: 0 25px 50px rgba(34, 197, 94, 0.2), 0 12px 24px rgba(34, 197, 94, 0.1);
}

.bg-gradient-to-br.from-trust-blue\/10:hover {
    box-shadow: 0 25px 50px rgba(59, 130, 246, 0.2), 0 12px 24px rgba(59, 130, 246, 0.1);
}

.bg-gradient-to-br.from-purple-600\/10:hover {
    box-shadow: 0 25px 50px rgba(147, 51, 234, 0.2), 0 12px 24px rgba(147, 51, 234, 0.1);
}

.bg-gradient-to-br.from-pink-600\/10:hover {
    box-shadow: 0 25px 50px rgba(219, 39, 119, 0.2), 0 12px 24px rgba(219, 39, 119, 0.1);
}

.bg-gradient-to-br.from-green-600\/10:hover {
    box-shadow: 0 25px 50px rgba(22, 163, 74, 0.2), 0 12px 24px rgba(22, 163, 74, 0.1);
}

/* Solid gradient cards (help.html) */
.bg-gradient-to-br.from-heart-red:hover,
.bg-gradient-to-br.from-moto-orange:hover,
.bg-gradient-to-br.from-trust-blue:hover,
.bg-gradient-to-br.from-hope-green:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 12px 24px rgba(0, 0, 0, 0.1);
    filter: brightness(1.05) saturate(1.05);
}

/* Partner items hover effect */
.partner-item {
    overflow: visible;
    z-index: 1;
    position: relative;
}

.partner-item:hover {
    z-index: 50;
}

.partner-logo {
    height: 60px; /* Smaller default size */
    width: auto;
    object-fit: contain;
    filter: grayscale(0);
    transition: all 0.3s ease;
}

.partner-item:hover .partner-logo {
    height: 120px; /* 100% of section height on hover */
    filter: grayscale(0) brightness(1.1);
    z-index: 50;
    position: relative;
    transform: translateX(0); /* Prevent moving left beyond container */
    max-width: calc(100vw - 300px); /* Prevent overflow beyond title */
    margin-left: auto;
    margin-right: auto;
}

/* Stats cards hover effect - Ujednolicone z resztą */
.text-center.p-6.bg-white.rounded-lg:hover,
.text-center.p-8.bg-white.rounded-lg:hover,
.text-center.p-6.bg-gray-50.rounded-lg:hover,
.text-center.p-8.bg-gray-50.rounded-lg:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12), 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: rgba(220, 38, 38, 0.1);
}

/* Dodatkowe selektory dla wszystkich możliwych kombinacji kafelków */
.shadow-lg:hover,
.shadow-xl:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12), 0 12px 24px rgba(0, 0, 0, 0.08) !important;
}

/* Animacje dla małych elementów informacyjnych */
.bg-heart-red\/10.rounded-lg:hover,
.bg-hope-green\/10.rounded-lg:hover,
.bg-purple-600\/10.rounded-lg:hover,
.bg-pink-600\/10.rounded-lg:hover,
.bg-green-600\/10.rounded-lg:hover,
.bg-trust-blue\/10.rounded-lg:hover {
    transform: scale(1.01);
    transition: all 0.5s ease;
}

/* Animacje dla sekcji z border-l-4 (szczegółowe działania) */
.border-l-4 {
    transition: all 0.5s ease;
    cursor: pointer;
}

.border-l-4:hover {
    transform: translateX(8px);
    padding-left: 2rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 0 8px 8px 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* Specjalne efekty dla różnych kolorów border-l-4 */
.border-l-4.border-heart-red:hover {
    background-color: rgba(220, 38, 38, 0.05);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.1);
}

.border-l-4.border-moto-orange:hover {
    background-color: rgba(249, 115, 22, 0.05);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.1);
}

.border-l-4.border-trust-blue:hover {
    background-color: rgba(59, 130, 246, 0.05);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.1);
}

.border-l-4.border-hope-green:hover {
    background-color: rgba(34, 197, 94, 0.05);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.1);
}

.border-l-4.border-purple-600:hover {
    background-color: rgba(147, 51, 234, 0.05);
    box-shadow: 0 8px 25px rgba(147, 51, 234, 0.1);
}

.border-l-4.border-pink-600:hover {
    background-color: rgba(219, 39, 119, 0.05);
    box-shadow: 0 8px 25px rgba(219, 39, 119, 0.1);
}

.border-l-4.border-green-600:hover {
    background-color: rgba(22, 163, 74, 0.05);
    box-shadow: 0 8px 25px rgba(22, 163, 74, 0.1);
}

.border-l-4.border-red-600:hover {
    background-color: rgba(220, 38, 38, 0.05);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.1);
}

.border-l-4.border-yellow-600:hover {
    background-color: rgba(202, 138, 4, 0.05);
    box-shadow: 0 8px 25px rgba(202, 138, 4, 0.1);
}

.border-l-4.border-indigo-600:hover {
    background-color: rgba(79, 70, 229, 0.05);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.1);
}

/* Form styles */
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Copy button animation */
.copy-btn {
    transition: all 0.5s ease;
}

.copy-btn:hover {
    transform: scale(1.01);
}

.copy-btn.copied {
    background-color: #059669;
    transform: scale(0.95);
}

/* Mobile menu animation */
.mobile-menu {
    transition: all 0.3s ease;
    transform: translateY(-10px);
    opacity: 0;
}

.mobile-menu.show {
    transform: translateY(0);
    opacity: 1;
}

/* Lightbox styles */
#lightbox {
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

#lightbox.show {
    display: flex;
}

#lightbox-img {
    transition: transform 0.3s ease;
}

/* Scroll animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #DC2626;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #B91C1C;
}

/* Loading animation */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Video player responsive height */
#video-player {
    max-height: 80vh;
    width: 100%;
    object-fit: contain;
}

/* Navigation spacing improvements */
.hidden.md\:flex.items-center.space-x-8 {
    margin-left: 3rem;
}

/* Logo text styling to ensure proper layout */
.flex.items-center > div {
    white-space: nowrap;
    min-width: 140px;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    /* Navigation improvements */
    .nav-link {
        font-size: 0.875rem;
    }
    
    /* Hero sections */
    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.125rem !important;
    }
    
    /* Card spacing */
    .card-grid {
        gap: 1rem;
    }
    
    /* Text sizing */
    .text-4xl {
        font-size: 2rem !important;
    }
    
    .text-3xl {
        font-size: 1.875rem !important;
    }
    
    .text-2xl {
        font-size: 1.5rem !important;
    }
    
    /* Padding adjustments */
    .py-20 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .py-16 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
    
    /* Gallery improvements */
    .gallery-item img {
        height: 200px !important;
    }
    
    /* Partner carousel mobile */
    .partner-logo {
        height: 40px !important;
    }
    
    .partner-item:hover .partner-logo {
        height: 60px !important;
    }
    
    /* Contact info in navigation - hide on small screens */
    .border-l.border-gray-200 {
        display: none;
    }
    
    /* Button improvements */
    .btn-mobile {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
    
    /* Form improvements */
    .contact-form input,
    .contact-form textarea {
        font-size: 1rem;
    }
    
    /* Stats cards mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }
    
    /* Video responsive */
    video {
        height: auto !important;
        max-height: 250px;
    }
    
    /* Map responsive */
    iframe {
        height: 250px !important;
    }
}

@media (max-width: 640px) {
    /* Extra small screens */
    .hero-title {
        font-size: 2rem !important;
    }
    
    .text-xl {
        font-size: 1.125rem !important;
    }
    
    .text-lg {
        font-size: 1rem !important;
    }
    
    /* Single column layouts */
    .grid-cols-2 {
        grid-template-columns: repeat(1, 1fr) !important;
    }
    
    /* Smaller padding */
    .p-8 {
        padding: 1.5rem !important;
    }
    
    .p-6 {
        padding: 1rem !important;
    }
    
    /* Gallery single column */
    .gallery-grid {
        grid-template-columns: repeat(1, 1fr) !important;
    }
    
    /* Partner carousel single item */
    .partners-carousel .partner-item {
        width: 100% !important;
    }
}

/* Tablet specific improvements */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Contact info partial hide on tablets */
    .border-l.border-gray-200 span {
        display: none;
    }
    
    .border-l.border-gray-200 i {
        margin-right: 0;
    }
    
    /* Gallery 2 columns on tablets */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Improved mobile menu animation */
@media (max-width: 768px) {
    .mobile-menu {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    }
    
    .mobile-menu.show {
        max-height: 500px;
    }
    
    /* Mobile menu button animation */
    .mobile-menu-btn i {
        transition: transform 0.3s ease;
    }
    
    .mobile-menu-btn.active i {
        transform: rotate(90deg);
    }
}

/* Contact section mobile improvements */
@media (max-width: 768px) {
    #contact .grid {
        gap: 1.5rem;
    }
    
    #contact .flex {
        padding: 1rem;
        border-radius: 0.75rem;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
    }
    
    #contact .text-left {
        flex: 1;
        min-width: 0;
    }
    
    #contact .break-all {
        word-break: break-all;
        line-height: 1.4;
    }
    
    /* Fix "Napisz do nas" button color on mobile */
    #contact .bg-white.text-heart-red {
        background-color: white !important;
        color: #DC2626 !important;
    }
}

/* Partners section mobile improvements */
@media (max-width: 768px) {
    #partners .flex.items-center.gap-8 {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    #partners .flex-1.max-w-4xl {
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }
    
    #partners .partners-carousel-container {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    #partners .partners-carousel-container::-webkit-scrollbar {
        display: none;
    }
    
    #partners .partners-carousel {
        display: flex;
        width: max-content;
        transform: none !important;
        transition: none !important;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    #partners .partner-item {
        width: 120px !important;
        min-width: 120px;
        flex-shrink: 0;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    #partners .partner-logo {
        height: 60px !important;
        width: auto;
        max-width: 100px;
        object-fit: contain;
    }
    
    #partners .partner-item:hover .partner-logo {
        height: 60px !important;
        transform: none;
    }
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .card-hover:hover,
    .bg-white.rounded-xl:hover,
    .bg-white.rounded-lg:hover,
    .bg-white.rounded-2xl:hover {
        transform: none;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    /* Larger touch targets */
    .mobile-nav-link {
        padding: 1rem 0.75rem;
        font-size: 0.875rem; /* Keep smaller font size for "Garaż Mototrasy" */
    }
    
    button, .btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Disable card animations on mobile devices */
@media (max-width: 768px) {
    /* Disable transform animations for all cards on mobile */
    .card-hover:hover,
    .bg-white.rounded-xl:hover,
    .bg-white.rounded-lg:hover,
    .bg-white.rounded-2xl:hover,
    .bg-gray-50.rounded-xl:hover,
    .bg-gray-50.rounded-lg:hover,
    .bg-gray-50.rounded-2xl:hover,
    .action-card:hover,
    .bg-gradient-to-br:hover,
    .bg-gradient-to-r:hover,
    .text-center.p-6.bg-white.rounded-lg:hover,
    .text-center.p-8.bg-white.rounded-lg:hover,
    .text-center.p-6.bg-gray-50.rounded-lg:hover,
    .text-center.p-8.bg-gray-50.rounded-lg:hover {
        transform: none !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
        filter: none !important;
    }
}

/* Remove hover effect from main container on support.html */
.bg-gradient-to-br.from-gray-50.to-white.rounded-2xl:hover {
    transform: none !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    filter: none !important;
}

#video-player:fullscreen {
    max-height: 100vh;
    width: 100vw;
    object-fit: contain;
}

/* Breathing heart animation - subtle without glow */
.breathing-heart {
    animation: breathe 4s ease-in-out infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .typing-text {
        font-size: 1.25rem;
        animation: typing 1.5s steps(15, end) 2s both, blink-caret 1s step-end infinite 2s;
    }
    
    .hero-logo img {
        height: 6rem;
    }
    
    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .text-text-gray {
        color: #000000;
    }
    
    .bg-gray-50 {
        background-color: #ffffff;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .typing-text {
        animation: none;
        border-right: none;
    }
    
    .pulse-animation {
        animation: none;
    }
}

/* Focus styles for accessibility */
.focus\:ring-heart-red:focus {
    --tw-ring-color: rgba(220, 38, 38, 0.5);
}

/* Custom utilities */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

/* Animation delays for staggered effects */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }

/* Success message styles */
.success-message {
    background-color: #059669;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.success-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* Error message styles */
.error-message {
    background-color: #DC2626;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* Tooltip styles */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #1F2937;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1F2937 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Partners slider animation */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.partners-carousel {
    animation: scroll 30s linear infinite;
}

.partners-carousel:hover {
    animation-play-state: paused;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #DC2626;
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #B91C1C;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

/* Cookie banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1F2937;
    color: white;
    padding: 1rem;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

/* Loading spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #DC2626;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}