/* ====================================
   Button Animations & Styles
   ==================================== */

/* Base Button */
.btn-theme {
    position: relative;
    padding: 0.875rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Primary Button */
.btn-primary-theme {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary-theme:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-primary-theme:active {
    transform: translateY(0);
}

/* Secondary Button */
.btn-secondary-theme {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-secondary-theme:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* Outline Button */
.btn-outline-theme {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: none;
}

.btn-outline-theme:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Ghost Button */
.btn-ghost-theme {
    background: transparent;
    color: var(--text-primary);
    box-shadow: none;
}

.btn-ghost-theme:hover {
    background: var(--bg-card);
    transform: translateY(-2px);
}

/* Shine Effect */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.btn-shine:hover::before {
    left: 100%;
}

/* Pulse Animation */
.btn-pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 var(--primary);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(251, 191, 36, 0);
    }
}

/* Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Gradient Shift */
.btn-gradient-shift {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Float Animation */
.btn-float {
    animation: float-btn 3s ease-in-out infinite;
}

@keyframes float-btn {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Glow Effect */
.btn-glow {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
    animation: glow-btn 2s ease-in-out infinite;
}

@keyframes glow-btn {
    0%, 100% {
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(251, 191, 36, 0.8);
    }
}

.dark-mode .btn-glow {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    animation: glow-btn-dark 2s ease-in-out infinite;
}

@keyframes glow-btn-dark {
    0%, 100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.8);
    }
}

/* Bounce Animation */
.btn-bounce:hover {
    animation: bounce 0.6s;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Rotate Animation */
.btn-rotate:hover {
    animation: rotate 0.6s ease;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Scale Animation */
.btn-scale:hover {
    transform: scale(1.05);
}

/* Icon Button */
.btn-icon-theme {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-theme svg {
    width: 24px;
    height: 24px;
}

/* Button Group */
.btn-group-theme {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Button Sizes */
.btn-sm-theme {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg-theme {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

.btn-xl-theme {
    padding: 1.25rem 3rem;
    font-size: 1.25rem;
}

/* Loading Button */
.btn-loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Success Button */
.btn-success-theme {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-success-theme:hover {
    background: linear-gradient(135deg, #059669, #047857);
}

/* Danger Button */
.btn-danger-theme {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-danger-theme:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

/* Warning Button */
.btn-warning-theme {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.btn-warning-theme:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
}

/* Info Button */
.btn-info-theme {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.btn-info-theme:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

/* Disabled Button */
.btn-theme:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Chemistry Button Effect */
.btn-chemistry {
    position: relative;
    overflow: hidden;
}

.btn-chemistry::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-chemistry:hover::before {
    width: 300px;
    height: 300px;
}

/* Molecule Button */
.btn-molecule {
    position: relative;
}

.btn-molecule::after {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.8), transparent);
    animation: molecule-orbit 3s linear infinite;
}

@keyframes molecule-orbit {
    0% {
        transform: rotate(0deg) translateX(30px) rotate(0deg);
    }
    100% {
        transform: rotate(360deg) translateX(30px) rotate(-360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .btn-theme {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .btn-lg-theme {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    .btn-group-theme {
        flex-direction: column;
    }
}
