/* Modern Button Styles - Inspired by GROK Design */

/* Reset button styles */
button, .btn, .btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-warning, .btn-info, .btn-small {
    font-family: 'Geist Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: none;
    outline: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Primary Button (Main actions) */
.btn-primary, button[type="submit"], .btn.primary {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #ffffff;
    padding: 12px 24px;
    font-size: 14px;
    min-height: 44px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.btn-primary:hover, button[type="submit"]:hover, .btn.primary:hover {
    background: linear-gradient(135deg, #00b8e6 0%, #0088bb 100%);
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.3);
    transform: translateY(-1px);
}

.btn-primary:active, button[type="submit"]:active, .btn.primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.2);
}

/* Secondary Button */
.btn-secondary, .btn.secondary {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    color: #e0e0e0;
    padding: 12px 24px;
    font-size: 14px;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover, .btn.secondary:hover {
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-secondary:active, .btn.secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
}

/* Danger Button */
.btn-danger, .btn.danger {
    background: linear-gradient(135deg, #ff4757 0%, #e84118 100%);
    color: #ffffff;
    padding: 12px 24px;
    font-size: 14px;
    min-height: 44px;
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.btn-danger:hover, .btn.danger:hover {
    background: linear-gradient(135deg, #ff3742 0%, #d63031 100%);
    box-shadow: 0 4px 16px rgba(255, 71, 87, 0.3);
    transform: translateY(-1px);
}

.btn-danger:active, .btn.danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.2);
}

/* Success Button */
.btn-success, .btn.success {
    background: linear-gradient(135deg, #2ed573 0%, #1e824c 100%);
    color: #ffffff;
    padding: 12px 24px;
    font-size: 14px;
    min-height: 44px;
    border: 1px solid rgba(46, 213, 115, 0.3);
}

.btn-success:hover, .btn.success:hover {
    background: linear-gradient(135deg, #26d0ce 0%, #1dd1a1 100%);
    box-shadow: 0 4px 16px rgba(46, 213, 115, 0.3);
    transform: translateY(-1px);
}

.btn-success:active, .btn.success:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(46, 213, 115, 0.2);
}

/* Warning Button */
.btn-warning, .btn.warning {
    background: linear-gradient(135deg, #ffa502 0%, #ff6348 100%);
    color: #ffffff;
    padding: 12px 24px;
    font-size: 14px;
    min-height: 44px;
    border: 1px solid rgba(255, 165, 2, 0.3);
}

.btn-warning:hover, .btn.warning:hover {
    background: linear-gradient(135deg, #ff9500 0%, #ff5722 100%);
    box-shadow: 0 4px 16px rgba(255, 165, 2, 0.3);
    transform: translateY(-1px);
}

.btn-warning:active, .btn.warning:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 165, 2, 0.2);
}

/* Info Button */
.btn-info, .btn.info {
    background: linear-gradient(135deg, #3742fa 0%, #2f3542 100%);
    color: #ffffff;
    padding: 12px 24px;
    font-size: 14px;
    min-height: 44px;
    border: 1px solid rgba(55, 66, 250, 0.3);
}

.btn-info:hover, .btn.info:hover {
    background: linear-gradient(135deg, #5352ed 0%, #40407a 100%);
    box-shadow: 0 4px 16px rgba(55, 66, 250, 0.3);
    transform: translateY(-1px);
}

.btn-info:active, .btn.info:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(55, 66, 250, 0.2);
}

/* Small Button */
.btn-small, .btn.small {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    color: #e0e0e0;
    padding: 8px 16px;
    font-size: 12px;
    min-height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.btn-small:hover, .btn.small:hover {
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-small:active, .btn.small:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(255, 255, 255, 0.05);
}

/* Icon-only buttons */
.btn-small.icon-only, .btn.icon-only {
    padding: 8px;
    min-width: 32px;
    width: 32px;
    height: 32px;
}

.btn.icon-only {
    padding: 12px;
    min-width: 44px;
    width: 44px;
    height: 44px;
}

/* Disabled state */
button:disabled, .btn:disabled, .btn.disabled {
    background: linear-gradient(135deg, #404040 0%, #303030 100%) !important;
    color: #666666 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

button:disabled:hover, .btn:disabled:hover, .btn.disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Loading state */
.btn.loading, .btn-loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after, .btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button groups */
.btn-group {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.btn-group .btn {
    margin: 0;
}

.btn-group.vertical {
    flex-direction: column;
}

.btn-group.vertical .btn {
    width: 100%;
}

/* Floating Action Button */
.btn-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.btn-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.btn-fab:active {
    transform: scale(1.05);
}

/* Link buttons */
a.btn, a.btn-primary, a.btn-secondary, a.btn-danger, a.btn-success, a.btn-warning, a.btn-info, a.btn-small {
    text-decoration: none;
    display: inline-flex;
}

a.btn:hover, a.btn-primary:hover, a.btn-secondary:hover, a.btn-danger:hover, a.btn-success:hover, a.btn-warning:hover, a.btn-info:hover, a.btn-small:hover {
    text-decoration: none;
}

/* Form buttons */
input[type="submit"], input[type="button"], input[type="reset"] {
    font-family: 'Geist Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #ffffff;
    padding: 12px 24px;
    font-size: 14px;
    min-height: 44px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

input[type="submit"]:hover, input[type="button"]:hover, input[type="reset"]:hover {
    background: linear-gradient(135deg, #00b8e6 0%, #0088bb 100%);
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.3);
    transform: translateY(-1px);
}

input[type="submit"]:active, input[type="button"]:active, input[type="reset"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.2);
}

/* Special button variants */
.btn-outline {
    background: transparent;
    border: 2px solid currentColor;
    color: #00d4ff;
}

.btn-outline:hover {
    background: #00d4ff;
    color: #ffffff;
}

.btn-ghost {
    background: transparent;
    border: none;
    color: #e0e0e0;
    box-shadow: none;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .btn, .btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-warning, .btn-info {
        padding: 10px 20px;
        font-size: 13px;
        min-height: 40px;
    }
    
    .btn-small, .btn.small {
        padding: 6px 12px;
        font-size: 11px;
        min-height: 28px;
    }
    
    .btn-fab {
        width: 48px;
        height: 48px;
        bottom: 16px;
        right: 16px;
        font-size: 18px;
    }
}

/* Dark theme specific adjustments */
.dark-theme .btn-secondary, .dark-theme .btn.secondary {
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
    border-color: rgba(255, 255, 255, 0.15);
}

.dark-theme .btn-secondary:hover, .dark-theme .btn.secondary:hover {
    background: linear-gradient(135deg, #4a4a4a 0%, #3a3a3a 100%);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Animation for button press effect */
@keyframes buttonPress {
    0% { transform: scale(1); }
    50% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

.btn:active, button:active {
    animation: buttonPress 0.1s ease-in-out;
}
